Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Fix joining non-`Started` threads from blocking main thread

Open Feoramund opened this issue 1 year ago • 0 comments

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

Feoramund avatar May 10 '24 21:05 Feoramund