Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 369 for goroutines (0.19 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/cmd/gofmt/long_test.go

    	}
    	if *verbose {
    		fmt.Printf("running test using %d goroutines\n", *ngo)
    	}
    
    	// generate filenames
    	filenames := make(chan string, 32)
    	go genFilenames(t, filenames)
    
    	// launch test goroutines
    	done := make(chan int)
    	for i := 0; i < *ngo; i++ {
    		go testFiles(t, filenames, done)
    	}
    
    	// wait for all test goroutines to complete
    	for i := 0; i < *ngo; i++ {
    		<-done
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 20:27:28 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  9. docs/debugging/pprofgoparser/main.go

    At least one argument is required to run this tool.
    
    EXAMPLE:
         ./pprofgoparser --time 50m --margin 1m /path/to/*-goroutines-before,debug=2.txt
    `
    
    func main() {
    	flag.Parse()
    
    	if len(flag.Args()) == 0 {
    		log.Fatal(helpUsage)
    	}
    
    	var err error
    
    	goroutinesRE = regexp.MustCompile(`^goroutine [0-9]+ \[[^,]+(, ([0-9]+) minutes)?\]:$`)
    
    	if searchText != "" {
    		searchRE, err = regexp.Compile(searchText)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Mar 06 11:43:16 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. src/sync/mutex_test.go

    	// non-profitable and allows to confirm that spinning does not do harm.
    	// To achieve this we create excess of goroutines most of which do local work.
    	// These goroutines yield during local work, so that switching from
    	// a blocked goroutine to other goroutines is profitable.
    	// As a matter of fact, this benchmark still triggers some spinning in the mutex.
    	var m Mutex
    	var acc0, acc1 uint64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 16 21:25:35 UTC 2022
    - 5.9K bytes
    - Viewed (0)
Back to top