mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-23 07:57:52 +00:00
[core:thread] Added self_cleanup flag to properly auto-clean threads
This commit is contained in:
@@ -67,6 +67,11 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
|
||||
|
||||
sync.unlock(&t.mutex)
|
||||
|
||||
if t.self_cleanup {
|
||||
t.unix_thread = {}
|
||||
free(t, t.creation_allocator)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user