GreenThread #
@[implicit_reducible]
Equations
- Control.Concurrent.Scheduler.instBEqPosNat = { beq := fun (a b : Control.Concurrent.Scheduler.PosNat) => a.val == b.val }
@[implicit_reducible]
Equations
- Control.Concurrent.Scheduler.instToStringPosNat = { toString := fun (p : Control.Concurrent.Scheduler.PosNat) => toString p.val }
Scheduling #
Submit a green thread to Lean's thread pool. Returns the Task that
resolves when the action completes.
Uses IO.asTask with default priority (pooled, not dedicated).
This means the work is queued onto the bounded thread pool instead of
spawning a new OS thread. Millions of tasks can be queued — they are
just closures on the heap until a pool worker picks them up.
Equations
- One or more equations did not get rendered due to their size.