Expand description
Thunk (evaluated on first get) and Task (run synchronously when created; there are
no worker threads).
Functions§
- lean_
io_ ⚠as_ task BaseIO.asTask act prio(act,prioconsumed): runsactnow.- lean_
io_ ⚠bind_ task BaseIO.bindTask t f prio sync(t,f,prioconsumed).- lean_
io_ ⚠cancel IO.cancel : @& Task α → BaseIO Unit.- lean_
io_ ⚠cancel_ core IO.cancel: no-op, tasks are already finished.- lean_
io_ ⚠check_ canceled IO.checkCanceled : BaseIO Bool.- lean_
io_ ⚠check_ canceled_ core IO.checkCanceled: tasks are never canceled.- lean_
io_ ⚠get_ task_ state IO.getTaskState : @& Task α → BaseIO TaskState.- lean_
io_ ⚠get_ task_ state_ core IO.getTaskState: finished (2), or running (1) for the result of an unresolved promise, as the C runtime reports it.- lean_
io_ ⚠map_ task BaseIO.mapTask f t prio sync(f,t,prioconsumed).- lean_
io_ ⚠promise_ new IO.Promise.new : BaseIO (Promise α): a promise whose taskTask (Option α)holds no value untilresolve(some v) or until the promise is dropped (none).- lean_
io_ ⚠promise_ resolve IO.Promise.resolve : α → (@& Promise α) → BaseIO Unit(consumesvalue); a secondresolvekeeps the first value.- lean_
io_ ⚠promise_ result_ opt IO.Promise.result? : (@& Promise α) → Task (Option α).- lean_
io_ ⚠wait IO.wait : Task α → BaseIO α(consumest).- lean_
io_ ⚠wait_ any IO.waitAny : @& List (Task α) → BaseIO α: the value of the first task.- lean_
mk_ ⚠thunk Thunk.mkfrom a closureUnit → α(consumed).- lean_
option_ ⚠get_ or_ block Option.getOrBlock! : Option α → α(consumeso): the value, or a panic for a promise dropped without a value.- lean_
task_ ⚠bind Task.bind x f prio sync(x,f,prioconsumed).- lean_
task_ ⚠bind_ core - lean_
task_ ⚠get - The value of a task (borrowed in and out).
- lean_
task_ ⚠get_ own Task.get(consumest).- lean_
task_ ⚠map Task.map f t prio sync(f,t,prioconsumed).- lean_
task_ ⚠map_ core - lean_
task_ ⚠pure Task.pure(consumesa).- lean_
task_ ⚠spawn Task.spawn(candprioconsumed).- lean_
task_ ⚠spawn_ core - Runs the closure
c : Unit → α(consumed) now and returns the finished task. - lean_
thunk_ ⚠get - The value of
t(borrowed in and out). - lean_
thunk_ ⚠get_ core - Evaluates the closure of
tand stores the value; returns it borrowed. - lean_
thunk_ ⚠get_ own Thunk.get(borrowst, returns an owned value).- lean_
thunk_ ⚠pure Thunk.pure(consumesv).