diff --git a/core/sync/sync.odin b/core/sync/sync.odin index 5a0512275..c6aeddd5d 100644 --- a/core/sync/sync.odin +++ b/core/sync/sync.odin @@ -17,7 +17,7 @@ ticket_mutex_init :: proc(m: ^Ticket_Mutex) { ticket_mutex_lock :: inline proc(m: ^Ticket_Mutex) { ticket := atomic_add(&m.ticket, 1, .Relaxed); - for ticket != m.serving { + for ticket != atomic_load(&m.serving, .Acquire) { yield_processor(); } }