소스 검색

fix for spurious wakeups

Dale Weiler 3 년 전
부모
커밋
7f845bb165
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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()
 
-		if .Started not_in t.flags {
+		for (.Started not_in t.flags) {
 			sync.wait(&t.cond, &t.mutex)
 		}