Odin
Odin copied to clipboard
Fix joining non-`Started` threads from blocking main thread
While investigating #2746, I noticed this was happening for UNIX threads too. I was able to fix and test it for threads on Linux, but I do not have a Windows machine to test my fix there, so if someone can try it out, that would be great.
Here's the program I tested with:
package main
import "core:fmt"
import "core:thread"
main :: proc () {
p: thread.Pool
fmt.println("pool_init:")
thread.pool_init(&p, context.allocator, 1)
fmt.println("pool_destroy:")
thread.pool_destroy(&p)
fmt.println("done")
}
Fixes #2746