src/pmc/coroutine.pmc - Coroutine PMC
Sub to provide a subroutine that can stop in the middle,
and start back up later at the point at which it stopped.
See the Glossary for more information.
static void print_sub_name(PARROT_INTERP, PMC *sub_pmc)
static function to print coroutine information (for tracing/debugging)
Initializes the coroutine.
Clone the coroutine.
PMC * clone()
Clones the coroutine.
Signals the start of a yield.
Resets the state of the coroutine,
so that the next call will start at the first yield again.
Sets a coroutine to auto-resetting,
so it will never die when all yield states are exhausted.
You can use autoreset(0) to turn it off again.Use this with care,
as it might not do what you want!
opcode_t *invoke(void *next)
Swaps the "context" between the call to the coro and the yield back,
until all yields are exhausted and the coro is dead.