dowork — screenshot of git.sr.ht

dowork

dowork is an in-process, general-purpose task queueing system for Go, executing and rescheduling tasks within Goroutines. I find it a straightforward, non-distributed solution for background work.

Visit git.sr.ht →

Questions & Answers

What is dowork?
dowork is an in-process, generic task queueing library for Go programs. It manages the queuing, execution, and rescheduling of tasks within Goroutines in the same process.
Who should use the dowork library?
dowork is suitable for Go developers who need to manage background tasks within a single application process. It's ideal for scenarios where a simple, in-process task queue is sufficient and distributed systems are not required.
How does dowork compare to distributed task queues?
dowork is designed as an in-process task queue, meaning tasks are managed and executed within the same Go application. This differentiates it from distributed task queueing systems which rely on external message brokers or databases for task coordination across multiple services.
When is dowork an appropriate choice for task management?
dowork is appropriate when you need to perform asynchronous operations, background processing, or defer tasks within a single Go application. It's best used when the overhead of a distributed queue is unnecessary and tasks can be reliably processed by the local application.
Does dowork support retries and timeouts for tasks?
Yes, dowork tasks can be configured with options for maximum retries, maximum timeout for the overall task, and a deadline for each attempt. Retries are conducted with an exponential backoff mechanism.