mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix enum/match combo in sync_windows.v
This commit is contained in:
parent
9044f1437c
commit
a9ca9f45af
@ -62,11 +62,17 @@ pub fn (m mut Mutex) lock() {
|
||||
}
|
||||
}
|
||||
state := C.WaitForSingleObject(m.mx, INFINITE) // infinite wait
|
||||
/* TODO fix match/enum combo
|
||||
m.state = match state {
|
||||
WAIT_ABANDONED { .abandoned }
|
||||
WAIT_OBJECT_0 { .waiting }
|
||||
else { .broken }
|
||||
}
|
||||
*/
|
||||
mut s := MutexState.broken
|
||||
if state == WAIT_ABANDONED { s = .abandoned }
|
||||
else if state == WAIT_OBJECT_0 { s = .waiting }
|
||||
m.state = s
|
||||
}
|
||||
|
||||
pub fn (m mut Mutex) unlock() {
|
||||
|
Loading…
Reference in New Issue
Block a user