[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Re: Problem with concurrency, threads, Lua states and maybe GC?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 22 Jun 2010 13:52:32 -0300
> Thanks for the quick response :-)
> >(This makes tight loops that do not create
> >objects "atomic", however.)
> Can you elaborate? Could these changes affect the way my Lua & OS
> threads work together? (i.e. is there anything I need to be aware
> of, or change, when migrating up to 5.2)
The implementation now only may switch threads when creating objects
(or calling functions). So, in a loop like
for i=1,1000000000 do
<some-complex-numerical-computation-without-calling-functions>
end
the running thread will block access to this Lua state until the loop ends.
-- Roberto