Janet Notes and Examples

Fibers

Janet’s fibers are not preemptive.

Janet uses green threads (continuations), and they are first-class.

threading: fibers use

signals? Exceptions? Raising/catching? (I think error is for raising).

error vs prompt?

label?

ev module, dyns

fiber/new — …

ev/spawn — creates a fiber and immediately schedules it on the event loop.

Note: there’s a difference between a fiber on the event loop (which has been “scheduled”) vs just any old fiber.