[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Sharing data between LuaTask tasks...
- From: duck <duck@...>
- Date: Sun, 13 May 2007 21:16:04 +0000
It occurred to me that LuaTask (in which each LuaTask gets its own Lua
state in a new thread) might be a handy way of writing simple threaded
servers. However, only number and string objects can be passed in messages
I was wondering:
1. Is there any reliable way to pass an accept()ed LuaSocket object from
one LuaTask to another? Can userdata be serialised?
2. If so (and assuming that socket is only ever manipulated in the task to
which it's passed), is it safe to pass this sort of data between tasks? Is
LuaSocket itself thread-safe?
Has anyone used LuaTask for handling multiple threads which communicate
using multiple blocking sockets?