Re: SWIG question
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: SWIG question
- From: Rici Lake <lua@...>
- Date: 2007年2月28日 22:29:04 -0500
On 28-Feb-07, at 10:02 PM, gary ng wrote:
--- 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).
Well, that supervisor (which hasn't been very heavily
tested yet :) ) is written to work as a coroutine
itself. So you should be able to use it as a delegate
driven by some other supervisor; at least, that was
the idea.