mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 12:18:15 +00:00
fix zombie thread leak in thread self cleanup
This commit is contained in:
@@ -69,6 +69,9 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
|
||||
sync.unlock(&t.mutex)
|
||||
|
||||
if .Self_Cleanup in sync.atomic_load(&t.flags) {
|
||||
res := unix.pthread_detach(t.unix_thread)
|
||||
assert_contextless(res == 0)
|
||||
|
||||
t.unix_thread = {}
|
||||
// NOTE(ftphikari): It doesn't matter which context 'free' received, right?
|
||||
context = {}
|
||||
|
||||
Reference in New Issue
Block a user