Re:Python co-routines: follow-up to Python generators presen...
by cocorroto on Wednesday December 14, 2011 @11:07AM
(#3352322)
In section 9.1 and 9.2 of Programming in Lua,
http://www.lua.org/pil/9.2.html,
there are some explanations of coroutines, and the example of consumers and producers. Also there is a comparison with pipes, a key point is: "The cost of switching between processes is high. With coroutines, the cost of switching between tasks is much smaller (roughly the same cost of a function call), so the writer and the reader can go hand in hand.
[ Parent
| on HN ]
There are no comments on this comment yet.