- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 83 for CancelFunc (0.16 sec)
-
src/context/context.go
// parameter). func TODO() Context { return todoCtx{} } // A CancelFunc tells an operation to abandon its work. // A CancelFunc does not wait for the work to stop. // A CancelFunc may be called by multiple goroutines simultaneously. // After the first call, subsequent calls to a CancelFunc do nothing. type CancelFunc func() // WithCancel returns a copy of parent with a new Done channel. The returned
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 23.7K bytes - Viewed (0) -
src/internal/types/testdata/check/issues1.go
type sliceOf[E any] interface{ ~[]E } func append[T interface{}, S sliceOf[T], T2 interface{}](s S, t ...T2) S { panic(0) } var f func() var cancelSlice []context.CancelFunc var _ = append[context.CancelFunc, []context.CancelFunc, context.CancelFunc](cancelSlice, f) // A generic function must be instantiated with a type, not a value. func g[T any](T) T { panic(0) } var _ = g[int]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:56:37 UTC 2023 - 6K bytes - Viewed (0) -
cmd/shared-lock.go
break keepLock case ld.lockContext <- lkctx: // Send the lock context to anyone asking for it } } } } func mergeContext(ctx1, ctx2 context.Context) (context.Context, context.CancelFunc) { ctx, cancel := context.WithCancel(context.Background()) go func() { select { case <-ctx1.Done(): case <-ctx2.Done(): // The lock acquirer decides to cancel, exit this goroutine case <-ctx.Done():
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Feb 13 09:26:38 UTC 2023 - 2.3K bytes - Viewed (0) -
cni/cmd/install-cni/main.go
ctx, cancel := context.WithCancel(context.Background()) sigChan := make(chan os.Signal, 1) signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM) go func(sigChan chan os.Signal, cancel context.CancelFunc) { sig := <-sigChan log.Infof("Exit signal received: %s", sig) cancel() }(sigChan, cancel) rootCmd := cmd.GetCommand() if err := rootCmd.ExecuteContext(ctx); err != nil { os.Exit(1) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 1.2K bytes - Viewed (0) -
src/context/benchmark_test.go
var wg sync.WaitGroup ccf := make([][]CancelFunc, gomaxprocs) for i := range ccf { wg.Add(1) go func(i int) { defer wg.Done() cf := make([]CancelFunc, perPContexts) for j := range cf { _, cf[j] = WithTimeout(root, time.Hour) } ccf[i] = cf }(i) } wg.Wait() b.ResetTimer() b.RunParallel(func(pb *testing.PB) { wcf := make([]CancelFunc, 10) for pb.Next() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 02 00:44:24 UTC 2021 - 3.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/priority-and-fairness.go
// getRequestWaitContext returns a new context with a deadline of how // long the request is allowed to wait before it is removed from its // queue and rejected. // The context.CancelFunc returned must never be nil and the caller is // responsible for calling the CancelFunc function for cleanup. // - ctx: the context associated with the request (it may or may // not have a deadline).
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 12:18:35 UTC 2023 - 15.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/waitgroup/ratelimited_waitgroup.go
// of the active number of request(s). 'count' is the number of requests in // flight that are expected to invoke 'Done' on this wait group. type RateLimiterFactoryFunc func(count int) (RateLimiter, context.Context, context.CancelFunc) // RateLimitedSafeWaitGroup must not be copied after first use. type RateLimitedSafeWaitGroup struct { wg sync.WaitGroup // Once Wait is initiated, all consecutive Done invocation will be
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 21 14:08:00 UTC 2023 - 3.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/waitgroup/ratelimited_waitgroup_test.go
} return nil } type factory struct { limiter *limiterWrapper grace time.Duration ctx context.Context cancel context.CancelFunc countGot int } func (f *factory) NewRateLimiter(count int) (RateLimiter, context.Context, context.CancelFunc) { f.countGot = count f.limiter.delegate = rate.NewLimiter(rate.Limit(count/int(f.grace.Seconds())), 20) return f.limiter, f.ctx, f.cancel
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 21 14:08:00 UTC 2023 - 8.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/loop_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 19 02:48:08 UTC 2023 - 15.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/finisher/finisher_test.go
errorStatusObj := &metav1.Status{Status: metav1.StatusFailure, Message: "error message"} timeoutFunc := func() (context.Context, context.CancelFunc) { return context.WithTimeout(context.TODO(), time.Second) } testcases := []struct { name string timeout func() (context.Context, context.CancelFunc) fn ResultFunc expectedObj runtime.Object expectedErr error expectedPanic string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 07 14:20:33 UTC 2021 - 8.2K bytes - Viewed (0)