aboutsummaryrefslogtreecommitdiff
path: root/core/thread
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-05-13 12:58:18 +0100
committergingerBill <bill@gingerbill.org>2024-05-13 12:58:18 +0100
commit54ebfa6179da22688239e218959320866e87a4f9 (patch)
treef5dcef00d61e20da5fb8558df5e3095ce0671b56 /core/thread
parent4bdc8548bd7ec557797985c548bd846c51ffc926 (diff)
Fix hanging on `thread.join` for windows where the thread had not been `start`ed
Diffstat (limited to 'core/thread')
-rw-r--r--core/thread/thread_windows.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/thread/thread_windows.odin b/core/thread/thread_windows.odin
index 4e5e8c07a..314ef5842 100644
--- a/core/thread/thread_windows.odin
+++ b/core/thread/thread_windows.odin
@@ -100,7 +100,8 @@ _join :: proc(t: ^Thread) {
t.flags += {.Joined}
if .Started not_in t.flags {
- _start(t)
+ t.flags += {.Started}
+ win32.ResumeThread(t.win32_thread)
}
win32.WaitForSingleObject(t.win32_thread, win32.INFINITE)