aboutsummaryrefslogtreecommitdiff
path: root/tests/ehynes.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ehynes.lua')
-rw-r--r--tests/ehynes.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/ehynes.lua b/tests/ehynes.lua
index e203a12..9436c7d 100644
--- a/tests/ehynes.lua
+++ b/tests/ehynes.lua
@@ -4,6 +4,11 @@
4local lanes = require "lanes" 4local lanes = require "lanes"
5lanes.configure() 5lanes.configure()
6 6
7local SLEEP = function(...)
8 local k, v = lanes.sleep(...)
9 assert(k == nil and v == "timeout")
10end
11
7local function PRINT_FMT( fmt, ... ) 12local function PRINT_FMT( fmt, ... )
8 io.stderr:write( string.format(fmt,...).."\n" ) 13 io.stderr:write( string.format(fmt,...).."\n" )
9end 14end
@@ -36,7 +41,7 @@ local receiver2 = receiver_gen('another message')
36 41
37-- a function to pause and log the execution for debugging 42-- a function to pause and log the execution for debugging
38local function logf(s, f, ...) 43local function logf(s, f, ...)
39 linda:receive(1, "dummy") -- wait 1s 44 SLEEP(1)
40 PRINT_FMT( "*** %s", s ) 45 PRINT_FMT( "*** %s", s )
41 f(...) 46 f(...)
42end 47end