Documentation ¶
Overview ¶
Package synctx implements helpers for the context package on top of the sync package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkFunc ¶
WorkFunc a function that receives an context and optionally returns an error. Returning an error will cancel all other worker functions
type WorkQueue ¶
type WorkQueue struct {
// contains filtered or unexported fields
}
WorkQueue is a work queue implementation that respects cancellation using contexts
func NewWorkQueue ¶
NewWorkQueue creates a new WorkQueue that respects the passed context for cancellation
func (*WorkQueue) Add ¶
Add add work to the work queue. The passed description will be used for the error message, if any. The function will be immediately executed.
Click to show internal directories.
Click to hide internal directories.