diff options
Diffstat (limited to 'tests/deadlock.lua')
-rw-r--r-- | tests/deadlock.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/deadlock.lua b/tests/deadlock.lua index c85d99f..c38ca13 100644 --- a/tests/deadlock.lua +++ b/tests/deadlock.lua | |||
@@ -4,6 +4,11 @@ | |||
4 | local lanes = require('lanes').configure{with_timers=false} | 4 | local lanes = require('lanes').configure{with_timers=false} |
5 | local linda = lanes.linda "deadlock_linda" | 5 | local linda = lanes.linda "deadlock_linda" |
6 | 6 | ||
7 | local SLEEP = function(...) | ||
8 | local k, v = lanes.sleep(...) | ||
9 | assert(k == nil and v == "timeout") | ||
10 | end | ||
11 | |||
7 | print "let's begin" | 12 | print "let's begin" |
8 | 13 | ||
9 | local do_extra_stuff = true | 14 | local do_extra_stuff = true |
@@ -35,5 +40,5 @@ end | |||
35 | -- With the bug not fixed, the linda keeper's mutex is still acquired, | 40 | -- With the bug not fixed, the linda keeper's mutex is still acquired, |
36 | -- and the program hangs when the internal linda used for timers attempts to acquire the same keeper (there is only one by default) | 41 | -- and the program hangs when the internal linda used for timers attempts to acquire the same keeper (there is only one by default) |
37 | print('waiting a bit') | 42 | print('waiting a bit') |
38 | lanes.sleep(2) | 43 | SLEEP(2) |
39 | print('we should reach here') \ No newline at end of file | 44 | print('we should reach here') \ No newline at end of file |