Ver Fonte

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

Laytan Laats há 9 meses atrás
pai
commit
f1cae8d844
1 ficheiros alterados com 1 adições e 1 exclusões
  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: