Fix race condition; Change for in addressing mode
This commit is contained in:
1 parent
b504d6e12a
commit
956dd26aa0
2 files changed
+7
-6
No files matched your search
+1
-1
@@ -4702,6 +4702,7 @@ gb_inline void gb_thread_start_with_stack(gbThread *t, gbThreadProc *proc, void
|
||||
t->proc = proc;
|
||||
t->user_data = user_data;
|
||||
t->stack_size = stack_size;
|
||||
t->is_running = true;
|
||||
|
||||
#if defined(GB_SYSTEM_WINDOWS)
|
||||
t->win32_handle = CreateThread(NULL, stack_size, gb__thread_proc, t, 0, NULL);
|
||||
@@ -4719,7 +4720,6 @@ gb_inline void gb_thread_start_with_stack(gbThread *t, gbThreadProc *proc, void
|
||||
}
|
||||
#endif
|
||||
|
||||
t->is_running = true;
|
||||
gb_semaphore_wait(&t->semaphore);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user