diff options
author | Benoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m> | 2013-08-13 08:12:05 +0200 |
---|---|---|
committer | Benoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m> | 2013-08-13 08:12:05 +0200 |
commit | 7f7b29063d2f19a8bc2b229ae9b0ec82ce447cab (patch) | |
tree | 296e407a77e7e7f94add52967fe06e09aa7d58f3 /tests/require.lua | |
parent | a6f76ba28d7e7e9d2d277a85dfd054cb70c02b69 (diff) | |
download | lanes-3.6.3.tar.gz lanes-3.6.3.tar.bz2 lanes-3.6.3.zip |
version 3.6.3v3.6.3
* lane:cancel(<negative-timeout>) only causes cancel_test() to return
true but won't interrupt execution of the lane during linda operations
* more explicit errors when trying to transfer unknown source functions
(with new configure option verbose_errors)
* default options wrap allocator around a mutex when run by LuaJIT
Diffstat (limited to 'tests/require.lua')
-rw-r--r-- | tests/require.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/require.lua b/tests/require.lua index 1d081b4..656a7dd 100644 --- a/tests/require.lua +++ b/tests/require.lua | |||
@@ -4,9 +4,10 @@ | |||
4 | -- Test that 'require' works from sublanes | 4 | -- Test that 'require' works from sublanes |
5 | -- | 5 | -- |
6 | lanes = require "lanes" | 6 | lanes = require "lanes" |
7 | lanes.configure() | 7 | lanes.configure{with_timers = false} |
8 | 8 | ||
9 | local function a_lane() | 9 | local function a_lane() |
10 | print "IN A LANE" | ||
10 | -- To require 'math' we still actually need to have it initialized for | 11 | -- To require 'math' we still actually need to have it initialized for |
11 | -- the lane. | 12 | -- the lane. |
12 | -- | 13 | -- |
@@ -15,7 +16,7 @@ local function a_lane() | |||
15 | assert( math.sqrt(4)==2 ) | 16 | assert( math.sqrt(4)==2 ) |
16 | 17 | ||
17 | assert( lanes==nil ) | 18 | assert( lanes==nil ) |
18 | local lanes = require "lanes".configure() | 19 | local lanes = require "lanes".configure{with_timers = false} |
19 | assert( lanes and lanes.gen ) | 20 | assert( lanes and lanes.gen ) |
20 | 21 | ||
21 | local h= lanes.gen( function() return 42 end ) () | 22 | local h= lanes.gen( function() return 42 end ) () |
@@ -24,7 +25,7 @@ local function a_lane() | |||
24 | return v==42 | 25 | return v==42 |
25 | end | 26 | end |
26 | 27 | ||
27 | local gen= lanes.gen( "math,package,string,table", a_lane ) | 28 | local gen= lanes.gen( "math,package,string,table", {package={}},a_lane ) |
28 | 29 | ||
29 | local h= gen() | 30 | local h= gen() |
30 | local ret= h[1] | 31 | local ret= h[1] |