Job

Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.

ShotInstancenot creatablecomingPrograms

Up and coming

One piece of work in a queue: wait for its result, see where it is, or cancel it.

JobQueue's Add gives one, a child of its queue while it waits or runs. Status is Waiting, Running, Done, Failed or Cancelled, and Finished fires with the final one. Cancelling a waiting job drops it; a running one is marked and its result ignored.

Properties

NameTypeDefaultDescription
Status"Waiting" | "Running" | "Done" | "Failed" | "Cancelled"
Resultany
Errorstring?
Triesnumber
StartedAtnumber?
EndedAtnumber?

Methods

NameArgumentsReturnsDescription
WaitAsync
yields
()(any, string?)Waits for the job to end and returns its result, or nil and the error.
Cancel()()Drops a waiting job; a running one is marked and its result ignored.

Events

NamePassesDescription
Finished(string)Fires with the final Status when the job ends.
From ShotInstance 33