Fix data race when pool_stop_task is called

This commit is contained in:
Feoramund
2024-09-08 21:59:55 -04:00
parent dbb783fbf2
commit c3f363cfbc

View File

@@ -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 = {}
}
}