For debugging
Schedules a coroutine for evaluation.
Future calls to tick will run coro
up to its next yield
until it is completed.
As a convenience if coro
is a generator function and not a generator, it will be evaluated to produce a generator.
function* coroutineFunction() { ... }
let schedule = new Schedule()
schedule.add(coroutineFunction()) // this works
schedule.add(coroutineFunction) // so does this
coroutine to add
Stops a single coroutine
coroutine to remove
Discards all scheduled coroutines
Advances all scheduled coroutines once.
Each coroutine added with add will run up to its next yield
statement. Finished coroutines are removed
from the collection.
Generated using TypeDoc
A coroutine schedule.
Coroutines are added to a schedule with add and all scheduled coroutines are advanced with tick.