Browse Source

Fix hanging on `thread.join` for windows where the thread had not been `start`ed

gingerBill 1 year ago
parent
commit
54ebfa6179
1 changed files with 2 additions and 1 deletions
  1. 2 1
      core/thread/thread_windows.odin

+ 2 - 1
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)