Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TryGo (0.03 sec)

  1. src/cmd/vendor/golang.org/x/sync/errgroup/errgroup.go

    				g.err = err
    				if g.cancel != nil {
    					g.cancel(g.err)
    				}
    			})
    		}
    	}()
    }
    
    // TryGo calls the given function in a new goroutine only if the number of
    // active goroutines in the group is currently below the configured limit.
    //
    // The return value reports whether the goroutine was started.
    func (g *Group) TryGo(f func() error) bool {
    	if g.sem != nil {
    		select {
    		case g.sem <- token{}:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:57:25 UTC 2024
    - 3.3K bytes
    - Viewed (0)
Back to top