diff options
Diffstat (limited to 'src/lanes.lua')
-rw-r--r-- | src/lanes.lua | 9 |
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 |
227 | end | 229 | end |
228 | 230 | ||
@@ -237,6 +239,8 @@ linda = mm.linda | |||
237 | 239 | ||
238 | 240 | ||
239 | ---=== Timers ===--- | 241 | ---=== Timers ===--- |
242 | local want_timers = true | ||
243 | if want_timers then | ||
240 | 244 | ||
241 | local timer_gateway= assert( mm.timer_gateway ) | 245 | local 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 ) |
453 | end | 457 | end |
454 | 458 | ||
459 | end -- want_timers | ||
455 | 460 | ||
456 | ---=== Lock & atomic generators ===--- | 461 | ---=== Lock & atomic generators ===--- |
457 | 462 | ||