Re: Allocator thread safety question

  • From: Mike Pall <mike-1403@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 28 Mar 2014 00:30:17 +0100

Richard Hundt wrote:
> I saw the following note on in the LuaLanes docs:
> 
> <quote>
> Lanes wraps all calls to the state's allocator function inside a mutex.
> Useful when running Lanes with LuaJIT, whose allocator is not threadsafe.
> </quote>
> 
> Is the remark about thread safety correct, or are they talking about
> older versions?

That's nonsense and has never been true. Each LuaJIT state creates
a separate allocator state, so there are no thread-safety issues.

--Mike

Other related posts: