lua-users home
lua-l archive

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


It was thus said that the Great Coroutines once stated:
>
> I do agree that separate global_States in separate threads is the
> safer/saner way to go.  The issue I have with that is swallowing the cost
> of marshalling/serialization.  I wish there were a lua_xmove() for moving
> objects between global_States, so you could make all "Lua instances"
> visible within a shared memory space, and swap objects directly between
> them.

  I don't know.  I want to say that if you want to move an arbitrary object
between threads you are doing it wrong, but I'm not sure what you are trying
to do, so I won't say that 8-P

  In general, it's a difficult, if not outright, impossible task.  Tables
are difficult, and I suspect userdata is all but impossible to handle
correctly with a "lua_gsxmove()" function.  

  And as for the cost of marshalling/serialization, remember, the QNX X
server I'm talking about did all that, and *still* was faster than a shared
memory version of the server.  

  -spc