diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-06-01 07:15:27 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-06-02 14:54:32 -0400 |
| commit | 21064fbb60ac9b3a838b100e4718e1e66dfdf80f (patch) | |
| tree | 8a1a979d7bf6c2c84040a1a507a4da3c8fe55ee5 | |
| parent | 45fa9d81487e89b88e4b5cd22803be45ea341f85 (diff) | |
Clear thread pool task data on restart
| -rw-r--r-- | core/thread/thread_pool.odin | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/thread/thread_pool.odin b/core/thread/thread_pool.odin index 53f89ea0c..6d80cb619 100644 --- a/core/thread/thread_pool.odin +++ b/core/thread/thread_pool.odin @@ -180,6 +180,7 @@ pool_stop_task :: proc(pool: ^Pool, user_index: int, exit_code: int = 1) -> bool replacement := create(pool_thread_runner) replacement.user_index = t.user_index replacement.data = data + data.task = {} pool.threads[i] = replacement start(replacement) @@ -211,6 +212,7 @@ pool_stop_all_tasks :: proc(pool: ^Pool, exit_code: int = 1) { replacement := create(pool_thread_runner) replacement.user_index = t.user_index replacement.data = data + data.task = {} pool.threads[i] = replacement start(replacement) |