- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for lockOSThread (0.21 sec)
-
src/runtime/proc.go
// // All init functions are run on the startup thread. Calling LockOSThread // from an init function will cause the main function to be invoked on // that thread. // // A goroutine should call LockOSThread before calling OS services or // non-Go library functions that depend on per-thread state. // //go:nosplit func LockOSThread() { if atomic.Load(&newmHandoff.haveTemplateThread) == 0 && GOOS != "plan9" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 207.5K bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback.go
for i := 0; i < 100000; i++ { testCallbackPanic(t) } } func testCallbackPanicLocked(t *testing.T) { runtime.LockOSThread() defer runtime.UnlockOSThread() if !lockedOSThread() { t.Fatal("runtime.LockOSThread didn't") } defer func() { s := recover() if s == nil { t.Fatal("did not panic") } if s.(string) != "callback panic" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 111.5K bytes - Viewed (0)