- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 49 for goroutines (0.53 sec)
-
src/runtime/mprof.go
// // Some goroutines (the finalizer goroutine, which at various times can be // either a "system" or a "user" goroutine, and the goroutine that is // coordinating the profile, any goroutines created during the profile) move // directly to the "Satisfied" state. type goroutineProfileState uint32 const ( goroutineProfileAbsent goroutineProfileState = iota goroutineProfileInProgress
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:37 UTC 2024 - 53.3K bytes - Viewed (0) -
src/runtime/pprof/pprof_test.go
for j := 0; j < i; j++ { // Spin for longer and longer as the test goes on. This // goroutine will do O(N^2) work with the number of // goroutines it launches. This should be slow relative to // the work involved in collecting a goroutine profile, // which is O(N) with the high-water mark of the number of // goroutines in this process (in the allgs slice). runtime.Gosched() } if i == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 68.8K bytes - Viewed (0) -
src/runtime/mgc.go
// N.B. we intentionally wait on each goroutine individually // rather than starting all in a batch and then waiting once // afterwards. By running one goroutine at a time, we can take // advantage of runnext to bounce back and forth between // workers and this goroutine. In an overloaded application, // this can reduce GC start latency by prioritizing these // goroutines rather than waiting on the end of the run queue.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 62K bytes - Viewed (0) -
src/testing/testing.go
// by calling runtime.Goexit (which then runs all deferred calls in the // current goroutine). // Execution will continue at the next test or benchmark. // FailNow must be called from the goroutine running the // test or benchmark function, not from other goroutines // created during the test. Calling FailNow does not stop // those other goroutines. func (c *common) FailNow() { c.checkFuzzFn("FailNow") c.Fail()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 76.1K bytes - Viewed (0) -
src/time/time_test.go
// and that we also don't panic. func TestConcurrentTimerReset(t *testing.T) { const goroutines = 8 const tries = 1000 var wg sync.WaitGroup wg.Add(goroutines) timer := NewTimer(Hour) for i := 0; i < goroutines; i++ { go func(i int) { defer wg.Done() for j := 0; j < tries; j++ { timer.Reset(Hour + Duration(i*j)) } }(i)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:13:47 UTC 2024 - 56.5K bytes - Viewed (0) -
src/runtime/mgcmark.go
} // TODO: suspendG blocks (and spins) until gp // stops, which may take a while for // running goroutines. Consider doing this in // two phases where the first is non-blocking: // we scan the stacks we can and ask running // goroutines to scan themselves; and the // second blocks. stopped := suspendG(gp) if stopped.dead { gp.gcscandone = true return
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 21:25:11 UTC 2024 - 52.5K bytes - Viewed (0) -
src/internal/trace/order.go
return fmt.Errorf("expected no proc but had one") } // Check goroutine requirements. if reqs.Goroutine == event.MustHave && ctx.G == NoGoroutine { return fmt.Errorf("expected a goroutine but didn't have one") } else if reqs.Goroutine == event.MustNotHave && ctx.G != NoGoroutine { return fmt.Errorf("expected no goroutine but had one") } return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 52.4K bytes - Viewed (0) -
src/os/os_test.go
// Note the deferred Wait must be called after the deferred close(done), // to ensure the N goroutines have been released even if the main goroutine // calls Fatalf. It must be called before the Chdir back to the original // directory, and before the deferred deletion implied by TempDir, // so as not to interfere while the N goroutines are still running. defer wg.Wait() defer close(done) for i := 0; i < N; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 83.1K bytes - Viewed (0) -
src/net/http/transport.go
} return false } if trace != nil && trace.PutIdleConn != nil { trace.PutIdleConn(nil) } return true } // eofc is used to block caller goroutines reading from Response.Body // at EOF until this goroutines has (potentially) added the connection // back to the idle pool. eofc := make(chan struct{}) defer close(eofc) // unblock reader on errors
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0) -
src/cmd/go/internal/test/test.go
Allocations made in C or using C.malloc are not counted. -blockprofile block.out Write a goroutine blocking profile to the specified file when all tests are complete. Writes test binary as -c would. -blockprofilerate n Control the detail provided in goroutine blocking profiles by calling runtime.SetBlockProfileRate with n. See 'go doc runtime.SetBlockProfileRate'.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 14:34:32 UTC 2024 - 71.9K bytes - Viewed (0)