diff options
Diffstat (limited to 'core/thread')
| -rw-r--r-- | core/thread/thread_unix.odin | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin index 38bf8241d..fbf89f122 100644 --- a/core/thread/thread_unix.odin +++ b/core/thread/thread_unix.odin @@ -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 { |