Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 235 for goroutines (0.64 sec)

  1. src/cmd/trace/jsontrace.go

    	mode      traceviewer.Mode
    	startTime time.Duration
    	endTime   time.Duration
    
    	// Used if mode != 0.
    	focusGoroutine trace.GoID
    	goroutines     map[trace.GoID]struct{} // Goroutines to be displayed for goroutine-oriented or task-oriented view. goroutines[0] is the main goroutine.
    	tasks          []*trace.UserTaskSummary
    }
    
    // setTask sets a task to focus on.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  2. tests/util/leak/check.go

    	if err != nil {
    		t.Errorf("failed to fetch pre-test goroutines: %v", err)
    		return
    	}
    	existing := map[uint64]struct{}{}
    	for _, g := range existingRaw {
    		existing[g.id] = struct{}{}
    	}
    	filter := func(in []*goroutine) []*goroutine {
    		res := make([]*goroutine, 0, len(in))
    		for _, i := range in {
    			if _, f := existing[i.id]; !f {
    				// This was not in the goroutines list when the test started
    				res = append(res, i)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Dec 20 10:22:38 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/sync/errgroup/errgroup.go

    		}
    	}()
    	return true
    }
    
    // SetLimit limits the number of active goroutines in this group to at most n.
    // A negative value indicates no limit.
    //
    // Any subsequent call to the Go method will block until it can add an active
    // goroutine without exceeding the configured limit.
    //
    // The limit must not be modified while any goroutines in the group are active.
    func (g *Group) SetLimit(n int) {
    	if n < 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:57:25 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. src/internal/trace/testdata/testprog/stress.go

    // Tests a many interesting cases (network, syscalls, a little GC, busy goroutines,
    // blocked goroutines, LockOSThread, pipes, and GOMAXPROCS).
    
    //go:build ignore
    
    package main
    
    import (
    	"log"
    	"net"
    	"os"
    	"runtime"
    	"runtime/trace"
    	"sync"
    	"time"
    )
    
    func main() {
    	var wg sync.WaitGroup
    	done := make(chan bool)
    
    	// Create a goroutine blocked before tracing.
    	wg.Add(1)
    	go func() {
    		<-done
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. src/sync/mutex.go

    	}
    }
    
    // Unlock unlocks m.
    // It is a run-time error if m is not locked on entry to Unlock.
    //
    // A locked [Mutex] is not associated with a particular goroutine.
    // It is allowed for one goroutine to lock a Mutex and then
    // arrange for another goroutine to unlock it.
    func (m *Mutex) Unlock() {
    	if race.Enabled {
    		_ = m.state
    		race.Release(unsafe.Pointer(m))
    	}
    
    	// Fast path: drop lock bit.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top