Commit Graph

9 Commits

Author SHA1 Message Date
Daira Hopwood bc909a7a7f Replace http with https: in links to the MIT license.
Also change MIT/X11 to just MIT, since no distinction was intended.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01:00
syd c72a4732cc Remove Boost conditional compilation.
Boost is currently at version 106200 in the depends subsystem
so it is safe to remove code the refers to earlier versions.

This closes #2445
2017-11-23 00:05:21 -05:00
Casey Rodarmor 6b51b9b195 Replace boost::reverse_lock with our own. 2015-09-22 00:43:13 +00:00
Casey Rodarmor 626c5e6936 Make sure we re-acquire lock if a task throws 2015-09-22 00:43:13 +00:00
Cory Fields ef1d506054
Fix scheduler build with some boost versions.
Some boost versions have a conflicting overload of wait_until that returns void.
Explicitly use a template here to avoid hitting that overload.

Github-Pull: #6285
Rebased-From: 72bf90d770ce5b2653fd482928646cd6a9f5f6d7
2015-06-16 13:57:21 +02:00
Wladimir J. van der Laan bdcf5dea7c Fix intermittent hang issue in scheduler_tests
Don't clear `stopRequested` and `stopWhenEmpty` at the top of
`serviceQueue`, as this results in a race condition: on systems under
heavy load, some of the threads only get scheduled on the CPU when the
other threads have already finished their work. This causes the flags to
be cleared post-hoc and thus those threads to wait forever.

The potential drawback of this change is that the scheduler cannot be
restarted after being stopped (an explicit reset would be needed), but
we don't use this functionality anyway.
2015-05-21 19:07:10 +02:00
Gavin Andresen f50105486f
More robust CScheduler unit test
On a busy or slow system, the CScheduler unit test could fail because it
assumed all threads would be done after a couple of milliseconds.

Replace the hard-coded sleep with CScheduler stop() method that
will cleanly exit the servicing threads when all tasks are completely
finished.
2015-05-16 17:59:23 -04:00
Cory Fields cfefe5b88c
scheduler: fix with boost <= 1.50 2015-05-14 10:37:19 -04:00
Gavin Andresen 928b950e3b
CScheduler class for lightweight task scheduling
Simple class to manage a task queue that is serviced by one or
more threads.
2015-05-14 10:37:19 -04:00