aboutsummaryrefslogtreecommitdiff
path: root/core/thread
diff options
context:
space:
mode:
authorPatric Dexheimer <patric.dexheimer@gmail.com>2020-10-31 02:37:26 -0300
committerGitHub <noreply@github.com>2020-10-31 02:37:26 -0300
commit2231f02f615a0e91fec2c51a50fc597852d86cb0 (patch)
treec303596eef2b87a259df93fa2974db13747fdc83 /core/thread
parentf9eadc3e98201049517d7f3f66f61ee385c6f1a8 (diff)
Update thread_windows.odin
`n` was left over being always zero. But you want `win32.WaitForMultipleObjects` to be the number of threads to wait for which u already have with `j`.
Diffstat (limited to 'core/thread')
-rw-r--r--core/thread/thread_windows.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/thread/thread_windows.odin b/core/thread/thread_windows.odin
index 464f470ee..91142dec1 100644
--- a/core/thread/thread_windows.odin
+++ b/core/thread/thread_windows.odin
@@ -92,7 +92,7 @@ join_multiple :: proc(threads: ..^Thread) {
for k := 0; k < len(threads); k += MAXIMUM_WAIT_OBJECTS {
count := min(len(threads) - k, MAXIMUM_WAIT_OBJECTS);
- n, j := u32(0), 0;
+ j := u32(0);
for i in 0..<count {
handle := threads[i+k].win32_thread;
if handle != win32.INVALID_HANDLE {
@@ -100,7 +100,7 @@ join_multiple :: proc(threads: ..^Thread) {
j += 1;
}
}
- win32.WaitForMultipleObjects(n, &handles[0], true, win32.INFINITE);
+ win32.WaitForMultipleObjects(j, &handles[0], true, win32.INFINITE);
}
for t in threads {