lua-users home
lua-l archive

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


>From: "Martin Dvorak" <mdvorak@ninell.cz>

>Let's say I have thousands of objects in my application
>and I would like to create individual environment (or state)
>for each object, so that objects cannot interfere between
>each other. I am afraid it might not effective to have so
>many environments. Or was the new version developed
>exactly with this point in mind (I mean that the authors
>assumed the new version to be used this way)?

The new re-entrant API will allow you to create as many states as you wish,
limited only by the amount of memory you have.
Having one state per object is possible, but we did not design the new API
with this in mind. We aimed more at multi-threaded applications.

I wonder why you want to do this. Objects can share the same global and still
not interfere with each other. One way to ensure this is for them to have
different tags.
--lhf