diff options
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | src/lanes.lua | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,8 @@ | |||
1 | CHANGES: | 1 | CHANGES: |
2 | 2 | ||
3 | CHANGE 128: BGe 31-Oct-18 | ||
4 | * Better default value autodetection for protect_allocator setting | ||
5 | |||
3 | CHANGE 127: BGe 30-Oct-18 | 6 | CHANGE 127: BGe 30-Oct-18 |
4 | * restrict internal light userdata constants to 47 significant bits when building against LuaJIT-x64 | 7 | * restrict internal light userdata constants to 47 significant bits when building against LuaJIT-x64 |
5 | 8 | ||
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_) | |||
77 | demote_full_userdata = nil, | 77 | demote_full_userdata = nil, |
78 | verbose_errors = false, | 78 | verbose_errors = false, |
79 | -- LuaJIT provides a thread-unsafe allocator by default, so we need to protect it when used in parallel lanes | 79 | -- LuaJIT provides a thread-unsafe allocator by default, so we need to protect it when used in parallel lanes |
80 | protect_allocator = (package.loaded.jit and jit.version) and true or false | 80 | protect_allocator = (package.loaded.jit and jit.version and (package.loaded.ffi.abi( "32bit") or package.loaded.ffi.abi( "gc64"))) and true or false |
81 | } | 81 | } |
82 | local boolean_param_checker = function( val_) | 82 | local boolean_param_checker = function( val_) |
83 | -- non-'boolean-false' should be 'boolean-true' or nil | 83 | -- non-'boolean-false' should be 'boolean-true' or nil |