diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-06-01 07:16:14 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-06-02 14:54:32 -0400 |
| commit | 9dcf3457952c32e34baa9136c5c4163cb4a55ceb (patch) | |
| tree | 20a1ceefc4abf1143ccb99acd22455c07febf6e5 | |
| parent | 21064fbb60ac9b3a838b100e4718e1e66dfdf80f (diff) | |
Set thread pool `is_running` to false on shutdown
| -rw-r--r-- | core/thread/thread_pool.odin | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/thread/thread_pool.odin b/core/thread/thread_pool.odin index 6d80cb619..da5e116ff 100644 --- a/core/thread/thread_pool.odin +++ b/core/thread/thread_pool.odin @@ -225,6 +225,7 @@ pool_stop_all_tasks :: proc(pool: ^Pool, exit_code: int = 1) { // // The pool must still be destroyed after this. pool_shutdown :: proc(pool: ^Pool, exit_code: int = 1) { + intrinsics.atomic_store(&pool.is_running, false) sync.guard(&pool.mutex) for t in pool.threads { |