mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 13:00:28 +00:00
Fixed thread_pool not destroying threads
This commit is contained in:
@@ -70,6 +70,11 @@ pool_init :: proc(pool: ^Pool, thread_count: int, allocator := context.allocator
|
||||
|
||||
pool_destroy :: proc(pool: ^Pool) {
|
||||
delete(pool.tasks);
|
||||
|
||||
for thread in &pool.threads {
|
||||
destroy(thread);
|
||||
}
|
||||
|
||||
delete(pool.threads, pool.allocator);
|
||||
|
||||
sync.mutex_destroy(&pool.mutex);
|
||||
|
||||
Reference in New Issue
Block a user