On Thursday, September 1, 2016 at 4:40:50 AM UTC-7, Tieson Molly wrote: > > Are there any go projects that implement a queue where workers that > consume the queue could be tracked and potentially killed if the end user > decides to cancel the job? >
I assume you mean across multiple worker processes; possibly all on one host or possibly in a distributed fashion. My goq project, pronounced "go queue", https://github.com/glycerine/goq let's you cancel a job, using "goq kill <jobid>". Workers that were started with "goq work" will die after oneshot at work. Workers that were started with "goq work forever" will keep requesting jobs. If you mean within a single process, this is common and readily implemented using channels. The stdlib's "net/context" has even standardized an interface to such requests. I'll keep this short. Feel free to let me know if you meant in-process and need more detail. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
