[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] lua-zmq & lua-zmq-threads 1.0
- From: "Robert G. Jakabosky" <bobby@...>
- Date: Mon, 11 Apr 2011 23:13:34 -0700
On Monday 11, Linker wrote:
> Can lua-zmq make ZeroMQ work with Lua-Coroutine?
I am not sure what you are asking here. You can send/recv message over ZeroMQ
sockets from coroutines, but lua-zmq will not yield the coroutine when the
socket blocks. You could wrap zmq sockets to make the send/recv call yield
the calling coroutine, then use a scheduler to resume the coroutine when the
socket is readable/writable (like what Copas [1] does for TCP sockets).
Someone could add support for zmq sockets to Copas, so coroutines could
block/yield on tcp/zmq sockets. But this is not something that I have time or
the need to do. I can give pointers to anyone that wants to try this.
1. http://keplerproject.github.com/copas/
--
Robert G. Jakabosky