Age | Commit message (Collapse) | Author |
|
This takes a different approach than commit
9899ffd244dd367ba69dffe1f21f4f0222064a46.
Change the ThreadPool to automatically shutdown and join all threads
whenever waitUntilDone() is called. Then start the threads again
in pushTask().
Because the ThreadPool is meant to be used synchronously with
waitUntilDone() called after adding all required tasks, this should
obviate the need to call shutdown() before process exit, as
there won't be any threads running at that point.
Change-Id: I2b8e639004a94cf05ccb4522aa1f0d3dac88a936
Reviewed-on: https://gerrit.libreoffice.org/35510
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Ife4c8d948ffa116f044d43903de9485e43cfcae5
Reviewed-on: https://gerrit.libreoffice.org/32336
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The existing osl::Condition is an API and reliability disaster area.
Change-Id: I3be84e1c6a83e58c43c40c9c8720790d923a6694
Reviewed-on: https://gerrit.libreoffice.org/31163
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: Iabe292e68cb84b97f207061347ed6a30309dc9fd
Reviewed-on: https://gerrit.libreoffice.org/30679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
A new static member getPreferredConcurrency added to
comphelper::ThreadPool to return a configurable max
number of threads.
By default the new function returns the hardware_concurrency
value provided by std::thread. When MAX_CONCURRENCY envar is
defined, the return value is limited to whatever is set there.
Three call-sites that used std::thread::hardware_concurrency
have been replaced with getPreferredConcurrency.
Unittests added to cover the functionality of the new member.
Unittests are capped to 4 threads.
Change-Id: I3332e393a88a5ed436316fa712ed920a4b37f4af
Reviewed-on: https://gerrit.libreoffice.org/26254
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
|
|
Change-Id: I704a1e777505dbad83d81857f09601c2887fb6a1
Reviewed-on: https://gerrit.libreoffice.org/16682
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
(cherry picked from commit ffdf0ed4cd76188e780eceee4333f90a00217f9d)
Change-Id: Ia452487c0c8c66a35c4b9fba225348bdef1a27f7
|
|
Change-Id: I44b208a2c5c5bf73ac025462c9f7bd499ed0a49b
|
|
Change-Id: Ie57d0194418dd17a4c83e2859d6a85129c4f95e6
|
|
Change-Id: Iaf5a3bf28879f229a223a8760fd878f96958a53c
|
|
We want a pre-spun-up, shared thread-pool that doesn't get its
workers created & joined frequently.
Change-Id: I29081e3a3e3849ca30e63fd080ee3315d99cbe8d
|
|
Change-Id: Ib27b8b1ccc07ff194035d6c2ef3d45c429e3cea1
|