lua-users home
lua-l archive

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


Hi,
 
I wondered about this same question for a multi-state system we've been developing.  Since functions can have upvalues, they are less likely candidates to share over separate states than you'd expect.  But maybe function prototypes could be shared?  There is a fundamental issue: how to recognise that function prototypes are actually the same?  E.g. if I require "foo" in two separate states, how is it decided that a lot of function prototypes can be shared?  Maybe by interning prototypes like it is done for strings, only shared over states?  Another issue is thread safety and garbage collection on such shared structures.
 
--Wim

I want a single lua state with all common functions and data loaded in a central location and then each application to be able to operate on its **own** ‘virtual’ lua state without knowledge of other applications.  This really does have to be secure.  I do not want applications altering the global in any way unless it is using a function that exists in the global state.


This message and attachment(s) are intended solely for the use of the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone and with a "reply" message. Thank you for your cooperation.