Scheduler Lifecycle
Last updated
This page shows how each scheduler operation behaves before Start and while the event loop is running.
Operations by State
| Operation | Not started | Running |
|---|---|---|
Add |
Appended to the heap directly | Sent to the event loop via the add channel |
Remove |
Disabled and removed from the heap | Removed via the remove channel |
RemoveAll |
Disables every task | Clears the heap via the removeAll channel |
Start |
Starts the worker pool and event loop | No-op |
Stop |
Returns an immediately cancelled context | Stops the loop, waits for workers, returns a context cancelled after in-flight tasks finish |
See Scheduler API for New, Start, and Stop signatures.