diff options
Diffstat (limited to 'src/lanes.lua')
-rw-r--r-- | src/lanes.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lanes.lua b/src/lanes.lua index 0858ad7..cbcf74f 100644 --- a/src/lanes.lua +++ b/src/lanes.lua | |||
@@ -77,7 +77,9 @@ 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 | allocator = (package.loaded.jit and jit.version) and "protected" or nil | 80 | allocator = (package.loaded.jit and jit.version) and "protected" or nil, |
81 | -- it looks also like LuaJIT allocator may not appreciate direct use of its allocator for other purposes than the VM operation | ||
82 | internal_allocator = (package.loaded.jit and jit.version) and "libc" or "allocator" | ||
81 | } | 83 | } |
82 | local boolean_param_checker = function( val_) | 84 | local boolean_param_checker = function( val_) |
83 | -- non-'boolean-false' should be 'boolean-true' or nil | 85 | -- non-'boolean-false' should be 'boolean-true' or nil |
@@ -94,6 +96,10 @@ lanes.configure = function( settings_) | |||
94 | -- can be nil, "protected", or a function | 96 | -- can be nil, "protected", or a function |
95 | return val_ and (type( val_) == "function" or val_ == "protected") or true | 97 | return val_ and (type( val_) == "function" or val_ == "protected") or true |
96 | end, | 98 | end, |
99 | internal_allocator = function( val_) | ||
100 | -- can be "libc" or "allocator" | ||
101 | return val_ == "libc" or val_ == "allocator" | ||
102 | end, | ||
97 | on_state_create = function( val_) | 103 | on_state_create = function( val_) |
98 | -- on_state_create may be nil or a function | 104 | -- on_state_create may be nil or a function |
99 | return val_ and type( val_) == "function" or true | 105 | return val_ and type( val_) == "function" or true |