mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-20 21:35:19 +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 {
|
||||
data.task = task
|
||||
pool_do_work(pool, task)
|
||||
sync.guard(&pool.mutex)
|
||||
data.task = {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user