- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 316 for gomaxprocs (0.17 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/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/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) -
src/runtime/race/sched_test.go
import ( "fmt" "reflect" "runtime" "strings" "testing" ) func TestRandomScheduling(t *testing.T) { // Scheduler is most consistent with GOMAXPROCS=1. // Use that to make the test most likely to fail. defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1)) const N = 10 out := make([][]int, N) for i := 0; i < N; i++ { c := make(chan int, N) for j := 0; j < N; j++ { go func(j int) { c <- j
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 08 13:27:43 UTC 2022 - 977 bytes - Viewed (0)