lua-users home
lua-l archive

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


> 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