From e21a392b9c5f22c92e56fb0e0897cb8e77d51d0f Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Wed, 31 Oct 2018 12:22:26 +0100 Subject: Better protect_allocator autodetection --- src/lanes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lanes.lua b/src/lanes.lua index 09603b3..54fa0ac 100644 --- a/src/lanes.lua +++ b/src/lanes.lua @@ -77,7 +77,7 @@ lanes.configure = function( settings_) demote_full_userdata = nil, verbose_errors = false, -- LuaJIT provides a thread-unsafe allocator by default, so we need to protect it when used in parallel lanes - protect_allocator = (package.loaded.jit and jit.version) and true or false + protect_allocator = (package.loaded.jit and jit.version and (package.loaded.ffi.abi( "32bit") or package.loaded.ffi.abi( "gc64"))) and true or false } local boolean_param_checker = function( val_) -- non-'boolean-false' should be 'boolean-true' or nil -- cgit v1.2.3-55-g6feb