lua-users home
lua-l archive

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


On Sat, Jun 6, 2015 at 5:25 PM, Brigham Toskin <brighamtoskin@gmail.com> wrote:
> On Sat, Jun 6, 2015 at 1:21 PM, Nagaev Boris <bnagaev@gmail.com> wrote:
>>
>> You can use N Lua states in N threads (1 thread = 1 Lua state), but
>> you could not use 1 Lua state in N threads.
>
>
> Do you know if this applies to the "daughter states" created by coroutine
> threads? Is something like this e.g. what Lanes does?
>
> --
> Brigham Toskin

Coroutines aren't a separate global state, so those aren't threadsafe.

Lanes fires up completely separate global Lua states and has its own
communication system between them.

/s/ Adam