COROUTINE
Coroutine
Coroutines are computer program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations. Coroutines are well-suited for implementing more familiar program components such as cooperative tasks, exceptions, event loop, iterators, infinite lists and pipes.The above text is a snippet from Wikipedia: Coroutine
and as such is available under the Creative Commons Attribution/Share-Alike License.