1
0
Mirror von https://github.com/tkuschel/bees.git synchronisiert 2026-06-19 06:57:54 +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>
Dieser Commit ist enthalten in:
Zygo Blaxell
2022-11-23 22:09:33 -05:00
Ursprung 3f740d6b2d
Commit 7873988dac
2 geänderte Dateien mit 28 neuen und 15 gelöschten Zeilen
+5
Datei anzeigen
@@ -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;