mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-01 02:42:09 +00:00
can use sync.guard here
This commit is contained in:
@@ -98,10 +98,9 @@ _create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^
|
||||
}
|
||||
|
||||
_start :: proc(t: ^Thread) {
|
||||
sync.lock(&t.mutex)
|
||||
sync.guard(&t.mutex)
|
||||
t.flags += { .Started }
|
||||
sync.signal(&t.cond)
|
||||
sync.unlock(&t.mutex)
|
||||
}
|
||||
|
||||
_is_done :: proc(t: ^Thread) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user