scheduler ========= The scheduler implements a simple round-robin fiber scheduler. .. _stdlib_scheduler_Scheduler: Scheduler --------- static add(callable) ++++++++++++++++++++ Adds a fiber to the schedule. It will eventually run when ``Scheduler.next()`` is called. static await(fn) ++++++++++++++++ Calls ``fn`` and then switches to the next scheduled fiber. The expectation is that the ``fn`` called will ultimately pass ``Fiber.current`` to some asynchronous operation that will resume the fiber once the operation completes. .. code-block:: wren Scheduler.await { async_operation(Fiber.current, ...) } static next() +++++++++++++ Transfers control to the next fiber in the schedule.