Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 56 for coroutines (0.15 sec)

  1. 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.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  2. docs/debugging/pprofgoparser/main.go

    )
    
    func init() {
    	flag.DurationVar(&less, "less", 0, "goroutine waiting less than the specified time")
    	flag.DurationVar(&goTime, "time", 0, "goroutine waiting for exactly the specified time")
    	flag.DurationVar(&margin, "margin", 0, "margin time")
    	flag.StringVar(&searchText, "search", "", "Regex to search for a text in one goroutine stacktrace")
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  3. internal/dsync/dsync_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.
    	m := NewDRWMutex(ds, "")
    	var acc0, acc1 uint64
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
  4. misc/cgo/gmp/fib.go

    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build ignore
    
    // Compute Fibonacci numbers with two goroutines
    // that pass integers back and forth.  No actual
    // concurrency, just threads and synchronization
    // and foreign code on multiple pthreads.
    
    package main
    
    import (
    	big "."
    	"runtime"
    )
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 10 22:32:35 GMT 2023
    - 919 bytes
    - Viewed (0)
  5. internal/http/listener.go

    	acceptCh    chan acceptResult // channel where all TCP listeners write accepted connection.
    	ctx         context.Context
    	ctxCanceler context.CancelFunc
    }
    
    // start - starts separate goroutine for each TCP listener.  A valid new connection is passed to httpListener.acceptCh.
    func (listener *httpListener) start() {
    	// Closure to send acceptResult to acceptCh.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  6. cmd/namespace-lock_test.go

    		// lk2
    		lk2ch := make(chan struct{})
    		go func() {
    			defer close(lk2ch)
    			nsLk.lock(ctx, "volume", "path", "source", "opsID", false, 1*time.Millisecond)
    		}()
    		time.Sleep(1 * time.Millisecond) // wait for goroutine to advance; ref=2
    
    		// Unlock the 1st lock; ref=1 after this line
    		nsLk.unlock("volume", "path", false)
    
    		// Taking another lockMapMutex here allows queuing up additional lockers. This should
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 3.1K bytes
    - Viewed (0)
  7. misc/linkcheck/linkcheck.go

    	neededFrags = make(map[urlFrag][]string) // URL#frag -> who needs it
    )
    
    var aRx = regexp.MustCompile(`<a href=['"]?(/[^\s'">]+)`)
    
    // Owned by crawlLoop goroutine:
    var (
    	linkSources = make(map[string][]string) // url no fragment -> sources
    	fragExists  = make(map[urlFrag]bool)
    	problems    []string
    )
    
    func localLinks(body string) (links []string) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Oct 06 15:53:04 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  8. internal/s3select/csv/reader.go

    const csvSplitSize = 128 << 10
    
    // startReaders will read the header if needed and spin up a parser
    // and a number of workers based on GOMAXPROCS.
    // If an error is returned no goroutines have been started and r.err will have been set.
    func (r *Reader) startReaders(newReader func(io.Reader) *csv.Reader) error {
    	if r.args.FileHeaderInfo != none {
    		// Read column names
    		// Get one line.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/server_test.go

    	if f.testWG != nil {
    		defer f.testWG.Done()
    	}
    	args := f.Called(ambientPods)
    	return args.Error(0)
    }
    
    // Custom "wait group with timeout" for waiting for fakeServer calls in a goroutine to finish
    type WaitGroup struct {
    	count int32
    	done  chan struct{}
    }
    
    func NewWaitGroup() *WaitGroup {
    	return &WaitGroup{
    		done: make(chan struct{}),
    	}
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  10. cmd/batch-expire.go

    		VersionsSort: WalkVersionsSortDesc,
    	}); err != nil {
    		// Do not need to retry if we can't list objects on source.
    		return err
    	}
    
    	// Goroutine to periodically save batch-expire job's in-memory state
    	saverQuitCh := make(chan struct{})
    	go func() {
    		saveTicker := time.NewTicker(10 * time.Second)
    		defer saveTicker.Stop()
    		for {
    			select {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 21K bytes
    - Viewed (1)
Back to top