I assume coroutines could be trivially implemented with sync_channel(0), which blocks the sender until the receiver takes the message. (And the receiver blocks until there is a message available.)
The 'generator' use of coroutines could be implemented with Receiver::iter, which is an iterator over a channel.
(As I understand it, coroutines are just a special case of channels.)
The 'generator' use of coroutines could be implemented with Receiver::iter, which is an iterator over a channel.
(As I understand it, coroutines are just a special case of channels.)
[Edit: see <http://doc.rust-lang.org/std/comm/> for channel docs]