Skip to main content

Module jobs

Module jobs 

Source
Expand description

What runs in the background, in one place (from lumen’s job registry): each job has a kind (histology, model, export…), a name saying what it is doing, how far it is, and a cancel flag. Only one job that drives the GPU runs at a time (a second is refused, saying what runs). The status bar lists them with a cancel button each; the work itself (off the UI thread) updates its job through its JobHandle, which ends the job when dropped (finished, failed or cancelled alike).

Structs§

Job
A job running.
JobHandle
A running job, held by the work doing it.

Functions§

cancel
Asks every job of kind to stop (when its work next checks).
cancel_id
Asks the job id to stop.
generation
A number that changes whenever a job starts, moves or ends (the status bar redraws then).
of
The latest job of kind.
running
The jobs running, oldest first.
start
Starts a job; refused while another GPU job runs (when this one is one too).