On Thu, Apr 14, 2011 at 07:02, Fabio Mascarenhas <mascaren...@acm.org> wrote: > On Wed, Apr 13, 2011 at 11:22 PM, Alexander Gladysh <aglad...@gmail.com> > wrote: >>> https://gist.github.com/918768
>>> This uses Robert's threading library and 0MQ binding, so will also >>> work with LuaJIT. Farm blocking stuff to the helper threads that send >>> messages to the application when they have stuff for the app to do. >>> The application checks its inbox whenever it is idle. >> I will consider this carefully. >> One extra thread per fork upsets me deeply (maybe it should not). > > They should spend most of the time blocked, so the only issue is the > size of their stack. It should be trivial to add an option to > llthreads to set a much smaller stack size (I think a single 4K page > would be enough for the typical helper thread). Looks like that. > If you standardize on a 0MQ socket for communication you can use > threads for anything not supported by libev (or libevent), and have > your event handlers send 0MQ messages too. The inproc socket performs > very well: > http://lua-users.org/lists/lua-l/2011-04/msg00393.html Well, that is two new open-source Lua libraries to test and accept into production. No offense to the authors, but I'm a bit wary with open-source. My experience is that there is about 1/10 chance of accepting new library or technology and then live for a year with the feelings of deep regret and pain. :-) Alexander. _______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/