diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-07 10:21:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 10:21:27 -0400 |
commit | aa5cd674aec28ecf207d6982797b1bb000a2b322 (patch) | |
tree | b51fc4ce00b65f34c5c0fe129b50a0a71be645df /vendor/golang.org/x | |
parent | b533fcb12eecc5206a0cb3e93fed1abc2f3abf3b (diff) | |
parent | a3fb15dffb1ce9c4c2dacceaa1e535ada4819060 (diff) | |
download | podman-aa5cd674aec28ecf207d6982797b1bb000a2b322.tar.gz podman-aa5cd674aec28ecf207d6982797b1bb000a2b322.tar.bz2 podman-aa5cd674aec28ecf207d6982797b1bb000a2b322.zip |
Merge pull request #10257 from containers/dependabot/go_modules/github.com/docker/docker-20.10.6incompatible
Bump github.com/docker/docker from 20.10.3-0.20210216175712-646072ed6524+incompatible to 20.10.6+incompatible
Diffstat (limited to 'vendor/golang.org/x')
-rw-r--r-- | vendor/golang.org/x/sync/errgroup/errgroup.go | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go deleted file mode 100644 index 9857fe53d..000000000 --- a/vendor/golang.org/x/sync/errgroup/errgroup.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2016 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. - -// Package errgroup provides synchronization, error propagation, and Context -// cancelation for groups of goroutines working on subtasks of a common task. -package errgroup - -import ( - "context" - "sync" -) - -// A Group is a collection of goroutines working on subtasks that are part of -// the same overall task. -// -// A zero Group is valid and does not cancel on error. -type Group struct { - cancel func() - - wg sync.WaitGroup - - errOnce sync.Once - err error -} - -// WithContext returns a new Group and an associated Context derived from ctx. -// -// The derived Context is canceled the first time a function passed to 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 := context.WithCancel(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 { - g.wg.Wait() - if g.cancel != nil { - g.cancel() - } - return g.err -} - -// Go calls the given function in a new goroutine. -// -// The first call to return a non-nil error cancels the group; its error will be -// returned by Wait. -func (g *Group) Go(f func() error) { - g.wg.Add(1) - - go func() { - defer g.wg.Done() - - if err := f(); err != nil { - g.errOnce.Do(func() { - g.err = err - if g.cancel != nil { - g.cancel() - } - }) - } - }() -} |