mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Set thread pool is_running to false on shutdown
This commit is contained in:
@@ -225,6 +225,7 @@ pool_stop_all_tasks :: proc(pool: ^Pool, exit_code: int = 1) {
|
|||||||
//
|
//
|
||||||
// The pool must still be destroyed after this.
|
// The pool must still be destroyed after this.
|
||||||
pool_shutdown :: proc(pool: ^Pool, exit_code: int = 1) {
|
pool_shutdown :: proc(pool: ^Pool, exit_code: int = 1) {
|
||||||
|
intrinsics.atomic_store(&pool.is_running, false)
|
||||||
sync.guard(&pool.mutex)
|
sync.guard(&pool.mutex)
|
||||||
|
|
||||||
for t in pool.threads {
|
for t in pool.threads {
|
||||||
|
|||||||
Reference in New Issue
Block a user