Skip to main content

Module background

Module background 

Source
Expand description

A one-at-a-time background job with a pollable state.

Runner<P, R> holds Idle or Running in a mutex. try_start spawns the job and refuses a second start while one runs. The job publishes progress through Progress::update. A drop guard returns the runner to Idle when the job ends, even on panic. The lock is never held across an await.

Structs§

LastRun
Progress
Handle the job uses to publish progress.
Runner

Enums§

RunnerState