aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.lua')
-rw-r--r--src/lanes.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lanes.lua b/src/lanes.lua
index 05c2ff1..252d151 100644
--- a/src/lanes.lua
+++ b/src/lanes.lua
@@ -204,7 +204,7 @@ function gen( ... )
204 end 204 end
205 end 205 end
206 206
207 local prio, cs, g_tbl 207 local prio, cs, g_tbl, packagepath, packagecpath
208 208
209 for k,v in pairs(opt) do 209 for k,v in pairs(opt) do
210 if k=="priority" then prio= v 210 if k=="priority" then prio= v
@@ -213,6 +213,8 @@ function gen( ... )
213 type(v)=="number" and v or 213 type(v)=="number" and v or
214 error( "Bad cancelstep: "..tostring(v), lev ) 214 error( "Bad cancelstep: "..tostring(v), lev )
215 elseif k=="globals" then g_tbl= v 215 elseif k=="globals" then g_tbl= v
216 elseif k=="packagepath" then packagepath= v
217 elseif k=="packagecpath" then packagecpath= v
216 --.. 218 --..
217 elseif k==1 then error( "unkeyed option: ".. tostring(v), lev ) 219 elseif k==1 then error( "unkeyed option: ".. tostring(v), lev )
218 else error( "Bad option: ".. tostring(k), lev ) 220 else error( "Bad option: ".. tostring(k), lev )
@@ -222,7 +224,7 @@ function gen( ... )
222 -- Lane generator 224 -- Lane generator
223 -- 225 --
224 return function(...) 226 return function(...)
225 return thread_new( func, libs, cs, prio, g_tbl, ...) -- args 227 return thread_new( func, libs, cs, prio, g_tbl, packagepath, packagecpath, ...) -- args
226 end 228 end
227end 229end
228 230
@@ -237,6 +239,8 @@ linda = mm.linda
237 239
238 240
239---=== Timers ===--- 241---=== Timers ===---
242local want_timers = true
243if want_timers then
240 244
241local timer_gateway= assert( mm.timer_gateway ) 245local timer_gateway= assert( mm.timer_gateway )
242-- 246--
@@ -452,6 +456,7 @@ function timer( linda, key, a, period )
452 timer_gateway:send( TGW_KEY, linda, key, wakeup_at, period ) 456 timer_gateway:send( TGW_KEY, linda, key, wakeup_at, period )
453end 457end
454 458
459end -- want_timers
455 460
456---=== Lock & atomic generators ===--- 461---=== Lock & atomic generators ===---
457 462