osthread: windows fix

This commit is contained in:
Judah Caruso 2025-11-18 19:58:46 -07:00
parent 5f9d040a51
commit 346bb3a2e9

View file

@ -18,7 +18,8 @@ var (
)
func init() {
kernel32 := syscall.NewLazyDLL("kernel.dll").Handle()
kernel32 := syscall.NewLazyDLL("kernel32.dll").Handle()
purego.RegisterLibFunc(&getCurrentThreadId, kernel32, "GetCurrentThreadId")
mainThreadId = getCurrentThreadId()
mainThreadId = getCurrentThreadId() // init is always called on the main thread
}