coroutine


Also found in: Dictionary, Wikipedia.

coroutine

[′kō·rü‚tēn]
(computer science)
A program module for which the lifetime of a particular activation record is independent of the time when control enters or leaves the module, and in which the activation record maintains a local instruction counter so that, whenever control enters the module, execution begins at the point where it stopped when control last left that particular instance of execution.
References in periodicals archive ?
Figure 3 shows a fragment of a simple program using the coroutine library.
This is akin to the Simula approach to coroutines [Birtwistle et al.
An extreme case is the availability of just one CPU: then the mechanism may be used for coroutine programming.
The third form describes subroutine and coroutine returns.
Since JSD targets implementations in languages that do not support concurrent tasks, the processes are instead mapped onto coroutines managed by a tailor-made scheduler.
For Kahn and MacQueen's streams, data circulate among coroutines. For Milner's and Hoare's process calculi, messages are sent and received along channels.
Many of the concepts in OOP were available in Simula 67, including class, subclass, virtual function, and active objects in the form of coroutines. Class simulation may be viewed as the first application framework.
The set of synchronization primitives may include both simple operations, like communication between coroutines, and much more complex mechanisms, like rendez-vous, conditional critical sections, monitors, etc.
In fact Simula, the first object-oriented language, simulated a simple form of concurrency using coroutines on conventional architectures.
Coroutines are not suitable for specifying true parallel processing since: a.
The objects are then combined to define the overall user interface as a set of coroutines, rather than inappropriately as a single highly regular state transition diagram.