1 # Copyright (C) 2007-2009, Parrot Foundation.
6 Coroutines are like special subroutines that use C<.yield> instead of
7 C<.return>. In a normal subroutine, C<.return> passes results back to
8 the caller, and then destroys the subroutine environment. C<.yield> on
9 the other hand returns results to the parent but does not destroy the
10 subroutine environment. The next time the coroutine is called, it
11 continues execution from the point of the last C<.yield>, as if nothing
12 has happened. If a coroutine calls C<.return> eventually, it is
13 destroyed like a normal subroutine and the next call to it will start
14 from the beginning of the coroutine.
41 # vim: expandtab shiftwidth=4 ft=pir: