Igor Kushnir a72fdb9ca2 ConcurrentQueue::cancelPending: don't reset jobsLeft to 0
Worker threads may well be executing jobs while this function is being
called. If ConcurrentQueue::waitAll() is called soon enough after
cancelPending(), the worker threads may still be running, but waitAll()
would return immediately as jobsLeft would be nonpositive.

Subtracting _queue.size() from jobsLeft sets this variable to the number
of worker threads that are executing jobs at the moment.

ConcurrentQueueTest::cancelPending1UserThread() passes most of the time
now. But it still fails occasionally because it depends on the timing of
thread scheduling, which is unreliable.
2021-12-29 09:36:44 +01:00
..
2021-10-19 00:00:08 +02:00
2021-10-19 00:00:08 +02:00
2021-10-18 21:56:52 +02:00
2021-10-18 21:56:52 +02:00
2021-10-19 00:00:08 +02:00
2019-05-30 19:46:37 +02:00
2019-05-30 19:46:37 +02:00
2021-10-18 21:56:52 +02:00
2019-05-30 19:46:37 +02:00
2019-05-30 19:46:37 +02:00
2021-10-18 21:56:52 +02:00
2021-10-18 21:56:52 +02:00
2021-10-18 21:56:52 +02:00
2021-10-18 21:56:52 +02:00
2021-10-18 21:56:52 +02:00
2021-10-19 00:00:08 +02:00
2021-04-30 09:52:31 +02:00
2020-08-31 16:19:42 +02:00
2020-08-31 16:04:26 +02:00
2021-10-18 21:56:52 +02:00
2021-10-18 21:56:52 +02:00