osthread: windows fix
This commit is contained in:
parent
5f9d040a51
commit
346bb3a2e9
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue