- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 348 for gomaxprocs (0.19 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/proc_test.go
t.Skip("skipping during short test") } maxprocs := runtime.GOMAXPROCS(3) compl := make(chan bool, 2) go func() { for i := 0; i != 1000; i += 1 { runtime.GC() } compl <- true }() go func() { for i := 0; i != 1000; i += 1 { runtime.GOMAXPROCS(3) } compl <- true }() go perpetuumMobile() <-compl <-compl stop <- true runtime.GOMAXPROCS(maxprocs) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 25.8K 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/testing/allocs.go
// a warm-up. The average number of allocations over the specified number of // runs will then be measured and returned. // // AllocsPerRun sets GOMAXPROCS to 1 during its measurement and will restore // it before returning. func AllocsPerRun(runs int, f func()) (avg float64) { defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1)) // Warm up the function f() // Measure the starting statistics var memstats runtime.MemStats
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 02 00:13:47 UTC 2016 - 1.4K bytes - Viewed (0)