add tagging to ThreadTasks so we don't need more one pool

Desktop / LibreOffice - Noel Grandin [peralex.com] - 18 July 2016 01:49 UTC

If more than one place in the code submits tasks to the shared pool, then waitTillDone() becomes unreliable. Add a tagging mechanism, so different callsites can wait on different sets of tasks.

Also try to protect our worker threads against exceptions from the thread tasks code.

Change-Id: Idde664ab50008d31a2dd73910bb22f50e62ae22f Reviewed-on: https://gerrit.libreoffice.org/27042

76ad32b add tagging to ThreadTasks so we don't need more one pool
comphelper/source/misc/threadpool.cxx | 149 ++++++++++++++++++--
.../source/primitive2d/sceneprimitive2d.cxx | 9 +-
include/comphelper/threadpool.hxx | 19 ++-
package/inc/ZipOutputStream.hxx | 4 +-
package/source/zipapi/ZipOutputStream.cxx | 6 +-
package/source/zippackage/ZipPackageStream.cxx | 7 +-
sc/source/filter/excel/xetable.cxx | 9 +-
sc/source/filter/oox/workbookfragment.cxx | 76 ++++------
sw/source/core/ole/ndole.cxx | 59 ++------
vcl/source/bitmap/bitmapscalesuper.cxx | 8 +-
10 files changed, 224 insertions(+), 122 deletions(-)

Upstream: cgit.freedesktop.org


  • Share