aboutsummaryrefslogtreecommitdiff
path: root/tests/track_lanes.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/track_lanes.lua')
-rw-r--r--tests/track_lanes.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/track_lanes.lua b/tests/track_lanes.lua
index 803fae5..ef2ca06 100644
--- a/tests/track_lanes.lua
+++ b/tests/track_lanes.lua
@@ -43,7 +43,7 @@ end
43-- sleeper( "main", 1) 43-- sleeper( "main", 1)
44 44
45-- the generator 45-- the generator
46local g = lanes.gen( "*", sleeper) 46local g = lanes.gen( "*", { name = 'auto' }, sleeper)
47 47
48-- start a forever-waiting lane (nil timeout) 48-- start a forever-waiting lane (nil timeout)
49local forever = g( "forever", 'indefinitely') 49local forever = g( "forever", 'indefinitely')
@@ -59,8 +59,10 @@ local threads = track( "============= START", 2)
59-- two_seconds forever 59-- two_seconds forever
60assert(threads[1].status == 'waiting' and threads[2].status == 'waiting') 60assert(threads[1].status == 'waiting' and threads[2].status == 'waiting')
61 61
62-- wait until ephemeral1 has completed 62-- wait until ephemeral1 has completed, should take about 2 seconds
63SLEEP(2.1) 63repeat
64 SLEEP(0.1)
65until ephemeral1.status == "done"
64 66
65local threads = track( "============= two_seconds dead", 2) 67local threads = track( "============= two_seconds dead", 2)
66-- two_seconds forever 68-- two_seconds forever