Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 441 for goroutines (0.28 sec)

  1. src/sync/waitgroup.go

    	"internal/race"
    	"sync/atomic"
    	"unsafe"
    )
    
    // A WaitGroup waits for a collection of goroutines to finish.
    // The main goroutine calls [WaitGroup.Add] to set the number of
    // goroutines to wait for. Then each of the goroutines
    // runs and calls [WaitGroup.Done] when finished. At the same time,
    // [WaitGroup.Wait] can be used to block until all goroutines have finished.
    //
    // A WaitGroup must not be copied after first use.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. pkg/ctrlz/topics/assets/templates/proc.html

        </tr>
        </thead>
    
        <tbody>
            <tr>
                <td># Threads</td>
                <td id="Threads">{{.Threads}}</td>
            </tr>
    
            <tr>
                <td># Goroutines</td>
                <td id="Goroutines">{{.Goroutines}}</td>
            </tr>
    
            <tr>
                <td>Effective Group Id</td>
                <td>{{.Egid}}</td>
            </tr>
    
            <tr>
                <td>Effective User Id</td>
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. src/net/http/main_test.go

    		// goroutines are a new leak from a subsequent test or just the same
    		// goroutines from the first leak still hanging around, and we may add a lot
    		// of latency waiting for them to exit at the end of each test.
    		return
    	}
    
    	// We shouldn't be running the leak check for parallel tests, because we might
    	// report the goroutines from a test that is still running as a leak from a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 22:49:46 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  4. src/runtime/race/timer_test.go

    //go:build race
    
    package race_test
    
    import (
    	"sync"
    	"testing"
    	"time"
    )
    
    func TestTimers(t *testing.T) {
    	const goroutines = 8
    	var wg sync.WaitGroup
    	wg.Add(goroutines)
    	var mu sync.Mutex
    	for i := 0; i < goroutines; i++ {
    		go func() {
    			defer wg.Done()
    			ticker := time.NewTicker(1)
    			defer ticker.Stop()
    			for c := 0; c < 1000; c++ {
    				<-ticker.C
    				mu.Lock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 576 bytes
    - Viewed (0)
  5. cmd/leak-detect_test.go

    		for _, g := range leaked {
    			t.Errorf("Leaked goroutine: %v", g)
    		}
    		return
    	}
    }
    
    // DetectTestLeak -  snapshots the currently running goroutines and returns a
    // function to be run at the end of tests to see whether any
    // goroutines leaked.
    // Usage: `defer DetectTestLeak(t)()` in beginning line of benchmarks or unit tests.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. src/internal/trace/testdata/testprog/stress-start-stop.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Tests a many interesting cases (network, syscalls, a little GC, busy goroutines,
    // blocked goroutines, LockOSThread, pipes, and GOMAXPROCS).
    
    //go:build ignore
    
    package main
    
    import (
    	"bytes"
    	"io"
    	"log"
    	"net"
    	"os"
    	"runtime"
    	"runtime/trace"
    	"sync"
    	"time"
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  7. src/runtime/testdata/testprogcgo/numgoroutine.go

    	// Test that there are just the expected number of goroutines
    	// running. Specifically, test that the spare M's goroutine
    	// doesn't show up.
    	if _, ok := checkNumGoroutine("first", 1+baseGoroutines); !ok {
    		return
    	}
    
    	// Test that the goroutine for a callback from C appears.
    	if C.CheckNumGoroutine(); !callbackok {
    		return
    	}
    
    	// Make sure we're back to the initial goroutines.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 22:52:37 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  8. pkg/ctrlz/topics/proc.go

    	Threads    int    `json:"threads"`
    	Goroutines int    `json:"goroutines"`
    }
    
    func getProcInfo() *procInfo {
    	pi := procInfo{
    		Egid:       os.Getegid(),
    		Euid:       os.Geteuid(),
    		GID:        os.Getgid(),
    		Pid:        os.Getpid(),
    		Ppid:       os.Getppid(),
    		UID:        os.Getuid(),
    		TempDir:    os.TempDir(),
    		Goroutines: runtime.NumGoroutine(),
    	}
    
    	pi.Groups, _ = os.Getgroups()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/promise/counting.go

    // This implementation tracks active goroutines:
    // the given counter is decremented for a goroutine waiting for this
    // varible to be set and incremented when such a goroutine is
    // unblocked.
    type countingPromise struct {
    	lock          sync.Locker
    	cond          sync.Cond
    	activeCounter counter.GoRoutineCounter // counter of active goroutines
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 10 14:37:53 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  10. test/ken/chan1.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Test communication with multiple simultaneous goroutines.
    
    package main
    
    import "runtime"
    
    const N = 1000 // sent messages
    const M = 10   // receiving goroutines
    const W = 2    // channel buffering
    var h [N]int   // marking of send/recv
    
    func r(c chan int, m int) {
    	for {
    		select {
    		case r := <-c:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 21:47:04 UTC 2012
    - 879 bytes
    - Viewed (0)
Back to top