Regarding the example in wikipedia: http://en.wikipedia.org/wiki/Coroutine
var q := new queue
coroutine produce
loop
while q is not full
create some new items
add the items to q
yield to consume
coroutine consume
loop
while q is not empty
remove some items from q
use the items
yield
I just wonder traditional event based approach can handle this kind of usage pattern, why need to use coroutine?