March Docs

Scheduler

Scheduler: runtime observability for the actor/task scheduler.

These counters are the load-shedding substrate: a supervisor or ingress actor polls them to decide when to shed. Interpreted backend reports the subset that is meaningful without the C scheduler (live actor count); unknown/unsupported indices read 0 on both backends.

Functions

fndropped_messagesdropped_messages() : Int do sched_stat(4) end#

Messages dropped by bounded-mailbox overflow policies.

fnlive_procslive_procs() : Int do sched_stat(0) end#

Green-thread processes currently alive (actors + tasks + main).

fnrunq_depthrunq_depth() : Int do sched_stat(2) end#

Cross-thread global run-queue depth (instantaneous).

fnstatstat(i : Int) : Int#

Raw stat by index. 0=live procs, 1=total spawned, 2=global runq depth, 3=stack-alloc failures, 4=messages dropped by mailbox policy, 5=stacks recycled, 6=pending timers. Unknown index reads 0.

fntotal_spawnedtotal_spawned() : Int do sched_stat(1) end#

Processes ever spawned over the program lifetime.