- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for registerInit (0.14 sec)
-
src/runtime/testdata/testprogcgo/lockosthread.go
void setExited(void *x); */ import "C" var mainThread C.pthread_t func init() { registerInit("LockOSThreadMain", func() { // init is guaranteed to run on the main thread. mainThread = C.pthread_self() }) register("LockOSThreadMain", LockOSThreadMain) registerInit("LockOSThreadAlt", func() { // Lock the OS thread now so main runs on the main thread. runtime.LockOSThread() })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 02 20:21:33 UTC 2023 - 2.5K bytes - Viewed (0) -
src/runtime/testdata/testprog/main.go
package main import "os" var cmds = map[string]func(){} func register(name string, f func()) { if cmds[name] != nil { panic("duplicate registration: " + name) } cmds[name] = f } func registerInit(name string, f func()) { if len(os.Args) >= 2 && os.Args[1] == name { f() } } func main() { if len(os.Args) < 2 { println("usage: " + os.Args[0] + " name-of-test") return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 23:34:33 UTC 2016 - 651 bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/main.go
package main import "os" var cmds = map[string]func(){} func register(name string, f func()) { if cmds[name] != nil { panic("duplicate registration: " + name) } cmds[name] = f } func registerInit(name string, f func()) { if len(os.Args) >= 2 && os.Args[1] == name { f() } } func main() { if len(os.Args) < 2 { println("usage: " + os.Args[0] + " name-of-test") return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 23:34:33 UTC 2016 - 651 bytes - Viewed (0) -
src/runtime/testdata/testprognet/main.go
package main import "os" var cmds = map[string]func(){} func register(name string, f func()) { if cmds[name] != nil { panic("duplicate registration: " + name) } cmds[name] = f } func registerInit(name string, f func()) { if len(os.Args) >= 2 && os.Args[1] == name { f() } } func main() { if len(os.Args) < 2 { println("usage: " + os.Args[0] + " name-of-test") return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 23:34:33 UTC 2016 - 651 bytes - Viewed (0) -
src/runtime/testdata/testprognet/net.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "net" ) func init() { registerInit("NetpollDeadlock", NetpollDeadlockInit) register("NetpollDeadlock", NetpollDeadlock) } func NetpollDeadlockInit() { fmt.Println("dialing") c, err := net.Dial("tcp", "localhost:14356") if err == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 23:34:33 UTC 2016 - 539 bytes - Viewed (0) -
src/runtime/testdata/testprog/lockosthread.go
package main import ( "os" "runtime" "sync" "time" ) var mainTID int func init() { registerInit("LockOSThreadMain", func() { // init is guaranteed to run on the main thread. mainTID = gettid() }) register("LockOSThreadMain", LockOSThreadMain) registerInit("LockOSThreadAlt", func() { // Lock the OS thread now so main runs on the main thread. runtime.LockOSThread() })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:00:09 UTC 2024 - 6.6K bytes - Viewed (0) -
src/runtime/testdata/testprog/deadlock.go
// license that can be found in the LICENSE file. package main import ( "fmt" "runtime" "runtime/debug" "time" ) func init() { registerInit("InitDeadlock", InitDeadlock) registerInit("NoHelperGoroutines", NoHelperGoroutines) register("SimpleDeadlock", SimpleDeadlock) register("LockedDeadlock", LockedDeadlock) register("LockedDeadlock2", LockedDeadlock2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 27 20:44:24 UTC 2021 - 6.5K bytes - Viewed (0) -
test/fixedbugs/issue31412a.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 11 20:17:26 UTC 2019 - 531 bytes - Viewed (0)