lua-users home
lua-l archive

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


on 6/4/04 7:10 AM, Mike Pall at mikelu-0406@mike.de wrote:

> I have been hit by this restriction, too because I have the need to pass
> arbitrary objects between different Lua universes (in the same process).
> After some research, I guess I have to pass around proxies or just copies.
> Not very efficient, but I found no better way. It is definitely hopeless
> to make the GC cross-universe-aware to avoid the copying overhead.

If the preferred Lua way to handle multiple processors and other cases where
cooperative multi-threading isn't an option is to use multiple Lua
universes, then there needs to be good support for packaging stuff up and
sending it between universes. I'm not sure what that would look like,
however. The current thread on Lua persistence might be a pointer, but I
think the cross-universe case might be able to exploit things like the fact
that the C function pointers can be used in both places, light userdata
should remain meaningful, etc..

Mark