Browse Source

fix for spurious wakeups

Dale Weiler 3 years ago
parent
commit
7f845bb165
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/thread/thread_unix.odin

+ 1 - 1
core/thread/thread_unix.odin

@@ -35,7 +35,7 @@ _create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^
 
 
 		t.id = sync.current_thread_id()
 		t.id = sync.current_thread_id()
 
 
-		if .Started not_in t.flags {
+		for (.Started not_in t.flags) {
 			sync.wait(&t.cond, &t.mutex)
 			sync.wait(&t.cond, &t.mutex)
 		}
 		}