- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for withCancelCause (0.22 sec)
-
src/cmd/vendor/golang.org/x/sync/errgroup/go120.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:57:25 UTC 2024 - 335 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sync/errgroup/pre_go120.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !go1.20 package errgroup import "context" func withCancelCause(parent context.Context) (context.Context, func(error)) { ctx, cancel := context.WithCancel(parent) return ctx, func(error) { cancel() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:57:25 UTC 2024 - 377 bytes - Viewed (0) -
src/context/example_test.go
ctx, cancel := context.WithCancelCause(ctx) stop := context.AfterFunc(cancelCtx, func() { cancel(context.Cause(cancelCtx)) }) return ctx, func() { stop() cancel(context.Canceled) } } ctx1, cancel1 := context.WithCancelCause(context.Background()) defer cancel1(errors.New("ctx1 canceled")) ctx2, cancel2 := context.WithCancelCause(context.Background())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 21 20:24:28 UTC 2023 - 6.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sync/errgroup/errgroup.go
// returns a non-nil error or the first time Wait returns, whichever occurs // first. func WithContext(ctx context.Context) (*Group, context.Context) { ctx, cancel := withCancelCause(ctx) return &Group{cancel: cancel}, ctx } // Wait blocks until all function calls from the Go method have returned, then // returns the first non-nil error (if any) from them. func (g *Group) Wait() error {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:57:25 UTC 2024 - 3.3K bytes - Viewed (0) -
src/net/http/transport_internal_test.go
if err != nil { t.Error(err) return } connc <- c }() tr := new(Transport) req, _ := NewRequest("GET", "http://"+ln.Addr().String(), nil) req = req.WithT(t) ctx, cancel := context.WithCancelCause(context.Background()) treq := &transportRequest{Request: req, ctx: ctx, cancel: cancel} cm := connectMethod{targetScheme: "http", targetAddr: ln.Addr().String()} pc, err := tr.getConn(treq, cm) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 15:57:17 UTC 2024 - 6.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testserver.go
// TODO: this is a candidate for using what is now test/utils/ktesting, // should that become a staging repo. ctx, cancel := context.WithCancelCause(context.Background()) var errCh chan error tearDown := func() { // Cancel is stopping apiextensions apiserver and its // delegates, which itself is cleaning up after itself,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 18:59:21 UTC 2024 - 9K bytes - Viewed (1)