lua-users home
lua-l archive

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


On Fri, Apr 13, 2018 at 5:01 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:

> Suppose two processes on Unix run Lua. Only one copy of the Lua shared library gets loaded. If a static variable is used, it gets updated when either process asks for a random number.

No. One makes a special effort to have shared (writable) memory between two processes in Unix, mere static variables are private to processes.

The issue has to do with ONE process and multiple Lua states in it.

Given the portability of Lua, the above should be extended to any platform that has no notion of process isolation.

Cheers,
V.