fix zombie thread leak in thread self cleanup
This commit is contained in:
1 parent
ef66f96cf2
commit
1e6419b5b7
2 files changed
+5
No files matched your search
@@ -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