aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.lua')
-rw-r--r--src/lanes.lua17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/lanes.lua b/src/lanes.lua
index ba9da81..4d6deac 100644
--- a/src/lanes.lua
+++ b/src/lanes.lua
@@ -146,7 +146,7 @@ lanes.configure = function( settings_)
146 author= "Asko Kauppi <akauppi@gmail.com>, Benoit Germain <bnt.germain@gmail.com>", 146 author= "Asko Kauppi <akauppi@gmail.com>, Benoit Germain <bnt.germain@gmail.com>",
147 description= "Running multiple Lua states in parallel", 147 description= "Running multiple Lua states in parallel",
148 license= "MIT/X11", 148 license= "MIT/X11",
149 copyright= "Copyright (c) 2007-10, Asko Kauppi; (c) 2011-18, Benoit Germain", 149 copyright= "Copyright (c) 2007-10, Asko Kauppi; (c) 2011-19, Benoit Germain",
150 version = assert( core.version) 150 version = assert( core.version)
151 } 151 }
152 152
@@ -198,13 +198,6 @@ lanes.configure = function( settings_)
198 -- 198 --
199 -- 'opt': .priority: int (-3..+3) smaller is lower priority (0 = default) 199 -- 'opt': .priority: int (-3..+3) smaller is lower priority (0 = default)
200 -- 200 --
201 -- .cancelstep: bool | uint
202 -- false: cancellation check only at pending Linda operations
203 -- (send/receive) so no runtime performance penalty (default)
204 -- true: adequate cancellation check (same as 100)
205 -- >0: cancellation check every x Lua lines (small number= faster
206 -- reaction but more performance overhead)
207 --
208 -- .globals: table of globals to set for a new thread (passed by value) 201 -- .globals: table of globals to set for a new thread (passed by value)
209 -- 202 --
210 -- .required: table of packages to require 203 -- .required: table of packages to require
@@ -246,10 +239,6 @@ lanes.configure = function( settings_)
246 local tv = type( v_) 239 local tv = type( v_)
247 return (tv == "number") and v_ or raise_option_error( "priority", tv, v_) 240 return (tv == "number") and v_ or raise_option_error( "priority", tv, v_)
248 end, 241 end,
249 cancelstep = function( v_)
250 local tv = type( v_)
251 return (tv == "number") and v_ or (v_ == true) and 100 or (v_ == false) and 0 or raise_option_error( "cancelstep", tv, v_)
252 end,
253 globals = function( v_) 242 globals = function( v_)
254 local tv = type( v_) 243 local tv = type( v_)
255 return (tv == "table") and v_ or raise_option_error( "globals", tv, v_) 244 return (tv == "table") and v_ or raise_option_error( "globals", tv, v_)
@@ -334,10 +323,10 @@ lanes.configure = function( settings_)
334 end 323 end
335 end 324 end
336 325
337 local cancelstep, priority, globals, package, required, gc_cb = opt.cancelstep, opt.priority, opt.globals, opt.package or package, opt.required, opt.gc_cb 326 local priority, globals, package, required, gc_cb = opt.priority, opt.globals, opt.package or package, opt.required, opt.gc_cb
338 return function( ...) 327 return function( ...)
339 -- must pass functions args last else they will be truncated to the first one 328 -- must pass functions args last else they will be truncated to the first one
340 return core_lane_new( func, libs, cancelstep, priority, globals, package, required, gc_cb, ...) 329 return core_lane_new( func, libs, priority, globals, package, required, gc_cb, ...)
341 end 330 end
342 end -- gen() 331 end -- gen()
343 332