--- Rici Lake <lua@ricilake.net> wrote:
That assumes that you have a supervisor (event loop,
I guess) which handles the coroutines. You could
write this in Lua,as well; I've put an example on
the wiki at
http://lua-users.org/wiki/CoroutinesAsEventHandlers
I am struggling with this supervisor issue. For many
cases, there is no need for copas(or at least the
semantics don't fit). Yet sending/receiving through
either a pipe or socket is a basic need for many
applications.
This would create a problem of, what supervisor to
use(or how to coop the supervisors). Take this
supervisor as an example, how can I make it work with
copas(as copas handles io/socket related
block/resume/yield which I don't want to re-invent).