diff options
Diffstat (limited to '')
-rw-r--r-- | unit_tests/scripts/lane/uncooperative_shutdown.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unit_tests/scripts/lane/uncooperative_shutdown.lua b/unit_tests/scripts/lane/uncooperative_shutdown.lua index 56c936b..eb89ed3 100644 --- a/unit_tests/scripts/lane/uncooperative_shutdown.lua +++ b/unit_tests/scripts/lane/uncooperative_shutdown.lua | |||
@@ -8,11 +8,11 @@ local lanes = require "lanes".configure{shutdown_timeout = 0.001, on_state_creat | |||
8 | -- launch lanes that blocks forever | 8 | -- launch lanes that blocks forever |
9 | local lane = function() | 9 | local lane = function() |
10 | local fixture = require "fixture" | 10 | local fixture = require "fixture" |
11 | fixture.forever() | 11 | fixture.block_for() |
12 | end | 12 | end |
13 | 13 | ||
14 | -- the generator | 14 | -- the generator |
15 | local g1 = lanes.gen("*", {name = "auto"}, lane) | 15 | local g1 = lanes.gen("*", { name = 'auto' }, lane) |
16 | 16 | ||
17 | -- launch lane | 17 | -- launch lane |
18 | local h1 = g1() | 18 | local h1 = g1() |
@@ -20,5 +20,5 @@ local h1 = g1() | |||
20 | -- wait until the lane is running | 20 | -- wait until the lane is running |
21 | repeat until h1.status == "running" | 21 | repeat until h1.status == "running" |
22 | 22 | ||
23 | -- let the script end, Lanes should throw std::logic_error because the lane did not gracefully terminate | 23 | -- this finalizer returns an error string that telling Universe::__gc will use to raise an error when it detects the uncooperative lane |
24 | lanes.finally(fixture.throwing_finalizer) | 24 | lanes.finally(fixture.throwing_finalizer) |