diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2011-02-14 21:20:24 +0100 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2011-02-14 21:20:24 +0100 |
commit | afb2da4789cdaddc5a0c3c9c2d57ccd36bcc74c7 (patch) | |
tree | 5f4208ca75f46848f793441530d16ca019d4bd00 /tests/errhangtest.lua | |
parent | baeb379c2e4eb436ecb0bcc4d88cb50930ef378e (diff) | |
download | lanes-afb2da4789cdaddc5a0c3c9c2d57ccd36bcc74c7.tar.gz lanes-afb2da4789cdaddc5a0c3c9c2d57ccd36bcc74c7.tar.bz2 lanes-afb2da4789cdaddc5a0c3c9c2d57ccd36bcc74c7.zip |
Fixed application hang-up because keeper state was not released in case of errors thrown by inter-state data copy for unsupported types
Diffstat (limited to 'tests/errhangtest.lua')
-rw-r--r-- | tests/errhangtest.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/errhangtest.lua b/tests/errhangtest.lua new file mode 100644 index 0000000..ddc1bfb --- /dev/null +++ b/tests/errhangtest.lua | |||
@@ -0,0 +1,13 @@ | |||
1 | lanes = require('lanes') | ||
2 | |||
3 | local linda = lanes.linda() | ||
4 | |||
5 | local coro = coroutine.create(function() end) | ||
6 | |||
7 | -- we are not allowed to send coroutines through a lanes | ||
8 | -- however, this should raise an error, not hang the program... | ||
9 | print( pcall(linda.send,linda, 'test', "oh boy")) | ||
10 | print( pcall(linda.send,linda, 'test', coro)) | ||
11 | res = linda:receive('test') | ||
12 | print( res) | ||
13 | -- linda:send( 'test', coro) | ||