- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 205 for gomaxprocs (0.49 sec)
-
src/internal/trace/testdata/testprog/gomaxprocs.go
// Start tracing. if err := trace.Start(os.Stdout); err != nil { log.Fatalf("failed to start tracing: %v", err) } // Run GOMAXPROCS a bunch of times, up and down. for i := 1; i <= 16; i *= 2 { runtime.GOMAXPROCS(i) time.Sleep(1 * time.Millisecond) } for i := 16; i >= 1; i /= 2 { runtime.GOMAXPROCS(i) time.Sleep(1 * time.Millisecond) } // Stop tracing. trace.Stop()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 967 bytes - Viewed (0) -
releasenotes/notes/gomaxprocs.yaml
apiVersion: release-notes/v2 kind: feature area: installation releaseNotes: - |
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 01 19:55:13 UTC 2023 - 186 bytes - Viewed (0) -
src/cmd/go/testdata/script/repro_build.txt
[GOOS:aix] env CGO_ENABLED=0 # go.dev/issue/56896 env GOMAXPROCS=16 go build -a -o http16.o net/http env GOMAXPROCS=17 go build -a -o http17.o net/http cmp -q http16.o http17.o env GOMAXPROCS=18 go build -a -o http18.o net/http cmp -q http16.o http18.o # Check that goroutine scheduling does not affect linker output. env GOMAXPROCS=16 go build -a -o gofmt16.exe cmd/gofmt env GOMAXPROCS=17 go build -a -o gofmt17.exe cmd/gofmt
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 13 18:59:19 UTC 2023 - 686 bytes - Viewed (0) -
src/runtime/rwmutex_test.go
panic(fmt.Sprintf("wlock(%d)\n", n)) } for i := 0; i < 100; i++ { } atomic.AddInt32(activity, -10000) rwm.Unlock() } cdone <- true } func HammerRWMutex(gomaxprocs, numReaders, num_iterations int) { GOMAXPROCS(gomaxprocs) // Number of active readers + 10000 * number of active writers. var activity int32 var rwm RWMutex rwm.Init() cdone := make(chan bool)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 15 22:00:45 UTC 2023 - 4.2K bytes - Viewed (0) -
src/sync/rwmutex_test.go
m.RLock() clocked <- true <-cunlock m.RUnlock() cdone <- true } func doTestParallelReaders(numReaders, gomaxprocs int) { runtime.GOMAXPROCS(gomaxprocs) var m RWMutex clocked := make(chan bool) cunlock := make(chan bool) cdone := make(chan bool) for i := 0; i < numReaders; i++ { go parallelReader(&m, clocked, cunlock, cdone) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 29 17:13:13 UTC 2021 - 4.9K bytes - Viewed (0) -
src/runtime/sema_test.go
} } func TestSemaHandoff1(t *testing.T) { if GOMAXPROCS(-1) <= 1 { t.Skip("GOMAXPROCS <= 1") } defer GOMAXPROCS(GOMAXPROCS(-1)) GOMAXPROCS(1) TestSemaHandoff(t) } func TestSemaHandoff2(t *testing.T) { if GOMAXPROCS(-1) <= 2 { t.Skip("GOMAXPROCS <= 2") } defer GOMAXPROCS(GOMAXPROCS(-1)) GOMAXPROCS(2) TestSemaHandoff(t) } func testSemaHandoff() bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 21 19:37:22 UTC 2022 - 4.2K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/lockosthread.go
register("LockOSThreadAlt", LockOSThreadAlt) } func LockOSThreadMain() { // This requires GOMAXPROCS=1 from the beginning to reliably // start a goroutine on the main thread. if runtime.GOMAXPROCS(-1) != 1 { println("requires GOMAXPROCS=1") os.Exit(1) } ready := make(chan bool, 1) go func() { // Because GOMAXPROCS=1, this *should* be on the main // thread. Stay there. 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/lockosthread.go
// checks that the runtime doesn't do anything terrible. // This requires GOMAXPROCS=1 from the beginning to reliably // start a goroutine on the main thread. if runtime.GOMAXPROCS(-1) != 1 { println("requires GOMAXPROCS=1") os.Exit(1) } ready := make(chan bool, 1) go func() { // Because GOMAXPROCS=1, this *should* be on the main // thread. Stay there. 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/internal/trace/testdata/testprog/stress-start-stop.go
// blocked goroutines, LockOSThread, pipes, and GOMAXPROCS). //go:build ignore package main import ( "bytes" "io" "log" "net" "os" "runtime" "runtime/trace" "sync" "time" ) func main() { defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(8)) outerDone := make(chan bool) go func() { defer func() { outerDone <- true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.7K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
} } cdone <- true } // Borrowed from rwmutex_test.go func hammerRWMutex(t *testing.T, gomaxprocs, numReaders, numIterations int) { t.Run(fmt.Sprintf("%d-%d-%d", gomaxprocs, numReaders, numIterations), func(t *testing.T) { resource := "test" runtime.GOMAXPROCS(gomaxprocs) // Number of active readers + 10000 * number of active writers. var activity int32 cdone := make(chan bool)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0)