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).
A job can leave an outcome (JobHandle::finish: what it found, or why it failed), kept for
a while after it ends. A command that starts a job returns job_reply ({"job": id}), so
whoever ran it (an agent through the MCP host) can wait for the job (is_running) and read
its outcome.
Structs§
Functions§
- cancel
- Asks every job of
kindto stop (when its work next checks). - cancel_
id - Asks the job
idto stop. - generation
- A number that changes whenever a job starts, moves or ends (the status bar redraws then).
- is_
running - Whether the job
idis still running. - job_of
- The job a command’s result names (
{"job": id, …}), if any. - job_
reply - What a command that started job
idreturns:{"job": id}. - of
- The latest job of
kind. - outcome
- The outcome the job
idleft, once it ended (None: running, or it left none and has been forgotten). - running
- The jobs running, oldest first.
- start
- Starts a job; refused while another GPU job runs (when this one is one too).