Giter Club home page Giter Club logo

Comments (4)

caevv avatar caevv commented on May 14, 2024 2

You stop accepting new tasks. Check example usage here:
https://cs.opensource.google/go/x/sync/+/036812b2:errgroup/errgroup.go

from pond.

alitto avatar alitto commented on May 14, 2024 1

Hey @caevv,
I just released v1.8.0 of pond and added a new API to support a functionality similar to what errgroup provides. Please check it out at https://github.com/alitto/pond#submitting-a-group-of-tasks-associated-to-a-context-since-v180 and let me know your thoughts.
As soon as one of the tasks returns a non-nil error, the remaining tasks are cancelled and never started. Also, a context.Context can be specified to allow cancelation of tasks.

from pond.

alitto avatar alitto commented on May 14, 2024

Hey @caevv, pond doesn't support that pattern at the moment, but it might be a good addition

from pond.

leonhandl3r avatar leonhandl3r commented on May 14, 2024

@alitto @caevv how golang can stop goroutines from another? We can not do it. I think it is popular to stop submit similar task to group of workers when an error from a worker which is running kind of this task

from pond.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.