lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Apr 17, 2008 at 1:13 PM, Graham Wakefield
<lists@grahamwakefield.net> wrote:
> Perhaps there may be a way to produce a more efficient, lower-level
> serialization using the Lua internals (which would appear as a conversion to
> 'immutable' status), I'm not sure. There are many nontrivial issues however:
> function upvalues, tables with cycles, userdata, etc.

It is indeed nontrivial. Actually, it's better described as "a pain in
the arse". I've already done it, though, so you don't have to if you
don't want to.

http://luaforge.net/projects/pluto/

Using Pluto (or other serialization library) to implement message
passing in a multi-lua_State implementation of parallelism is
downright trivial. Performance isn't everything it could be (there are
potential speed advantages to be realized from doing the serialization
and deserialization in parallel, rather than serially) but depending
on one's exact requirements it might well be sufficient.

Ben