summaryrefslogtreecommitdiff
path: root/package/inc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-05-21 12:41:44 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-05-21 17:25:32 +0200
commitaeb2014ba401707dece5d0cf3cb213ce307a5330 (patch)
tree7d542cbd43ad0a0bbe8b16f2f91808e2abb63d88 /package/inc
parent86618248683fa4048192d15356c7e6b430e8dbb9 (diff)
remove code confusion about threads vs thread tasks
A threadpool controls a number of threads that execute a number of thread *tasks* from a queue. The API even says they are tasks. So it's damn confusing when ZipPackageStream::saveChild() claims to limit the number of threads to 4x the maximum number of threads. It limits the number of queued thread tasks. Change-Id: I317497f27a82d92a7c8566b14aaeae73a4ffef1f Reviewed-on: https://gerrit.libreoffice.org/72677 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'package/inc')
-rw-r--r--package/inc/ZipOutputEntry.hxx4
-rw-r--r--package/inc/ZipOutputStream.hxx10
2 files changed, 7 insertions, 7 deletions
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx
index 15c94aecc14b..c35da5818062 100644
--- a/package/inc/ZipOutputEntry.hxx
+++ b/package/inc/ZipOutputEntry.hxx
@@ -36,8 +36,8 @@ class ZipPackageStream;
class ZipOutputEntry
{
- // allow only DeflateThread to change m_bFinished using setFinished()
- friend class DeflateThread;
+ // allow only DeflateThreadTask to change m_bFinished using setFinished()
+ friend class DeflateThreadTask;
css::uno::Sequence< sal_Int8 > m_aDeflateBuffer;
ZipUtils::Deflater m_aDeflater;
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index 814413da041e..ff7b66d64507 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -47,7 +47,7 @@ public:
const css::uno::Reference< css::io::XOutputStream > &xOStream );
~ZipOutputStream();
- void addDeflatingThread( ZipOutputEntry *pEntry, std::unique_ptr<comphelper::ThreadTask> pThreadTask );
+ void addDeflatingThreadTask( ZipOutputEntry *pEntry, std::unique_ptr<comphelper::ThreadTask> pThreadTask );
/// @throws css::io::IOException
/// @throws css::uno::RuntimeException
@@ -79,12 +79,12 @@ private:
void writeEXT( const ZipEntry &rEntry );
// ScheduledThread handling helpers
- void consumeScheduledThreadEntry(std::unique_ptr<ZipOutputEntry> pCandidate);
- void consumeFinishedScheduledThreadEntries();
+ void consumeScheduledThreadTaskEntry(std::unique_ptr<ZipOutputEntry> pCandidate);
+ void consumeFinishedScheduledThreadTaskEntries();
public:
- void reduceScheduledThreadsToGivenNumberOrLess(
- sal_Int32 nThreads);
+ void reduceScheduledThreadTasksToGivenNumberOrLess(
+ sal_Int32 nThreadTasks);
const std::shared_ptr<comphelper::ThreadTaskTag>& getThreadTaskTag() { return mpThreadTaskTag; }
};