package
Version:
v0.0.0-...-0044c33
Opens a new window with list of versions in this module.
Published: Aug 5, 2022
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package worker manages a set of registered jobs that execute on demand.
JobFunc defines a function that can execute work for a specific job.
Worker manages jobs and the execution of those jobs concurrently.
New constructs a Worker for managing and executing jobs.
Running returns the number of jobs running.
Shutdown waits for all jobs to complete before it returns.
Start lookups a job by key and launches a goroutine to perform the work. A
work key is returned so the caller can cancel work early.
Stop is used to cancel an existing job that is running.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.