mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix data race when pool_stop_task is called
This commit is contained in:
@@ -60,6 +60,7 @@ pool_thread_runner :: proc(t: ^Thread) {
|
|||||||
if task, ok := pool_pop_waiting(pool); ok {
|
if task, ok := pool_pop_waiting(pool); ok {
|
||||||
data.task = task
|
data.task = task
|
||||||
pool_do_work(pool, task)
|
pool_do_work(pool, task)
|
||||||
|
sync.guard(&pool.mutex)
|
||||||
data.task = {}
|
data.task = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user