mirror of
https://github.com/Zygo/bees.git
synced 2025-06-15 17:26:15 +02:00
task: add a pause() method as an alternative to cancel()
pause(true) stops the TaskMaster from processing any more Tasks, but does not destroy any queued Tasks. pause(false) re-enables Task processing. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -98,6 +98,11 @@ namespace crucible {
|
||||
/// affected (use set_thread_count(0) to wait for those
|
||||
/// to complete).
|
||||
static void cancel();
|
||||
|
||||
/// Stop running any new Tasks. All existing
|
||||
/// Consumer threads will exit. Does not affect queue.
|
||||
/// Does not wait for threads to exit. Reversible.
|
||||
static void pause(bool paused = true);
|
||||
};
|
||||
|
||||
class BarrierState;
|
||||
|
Reference in New Issue
Block a user