瀏覽代碼

fix #4496 - allow unlock of unlocked mutex (making it consistent with windows behaviour)

Laytan Laats 9 月之前
父節點
當前提交
f1cae8d844
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/sync/primitives_atomic.odin

+ 1 - 1
core/sync/primitives_atomic.odin

@@ -67,7 +67,7 @@ atomic_mutex_unlock :: proc "contextless" (m: ^Atomic_Mutex) {
 
 	switch atomic_exchange_explicit(&m.state, .Unlocked, .Release) {
 	case .Unlocked:
-		unreachable()
+		// Kind of okay - unlocking while already unlocked.
 	case .Locked:
 		// Okay
 	case .Waiting: