package
Version:
v1.1.7
Opens a new window with list of versions in this module.
Published: Feb 12, 2025
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Engine manages a pool of workers to execute tasks concurrently.
NewEngine initializes a new Engine with a logger and an optimal number of workers.
AddTask adds a new task to the task channel, scaling workers if necessary.
Start launches the initial set of worker goroutines.
Stop gracefully shuts down the engine by closing the task channel and waiting for all workers to finish.
Task represents a unit of work to be executed by the engine.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.