summaryrefslogtreecommitdiff
path: root/tests/errhangtest.lua
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2011-02-14 21:20:24 +0100
committerBenoit Germain <bnt.germain@gmail.com>2011-02-14 21:20:24 +0100
commitafb2da4789cdaddc5a0c3c9c2d57ccd36bcc74c7 (patch)
tree5f4208ca75f46848f793441530d16ca019d4bd00 /tests/errhangtest.lua
parentbaeb379c2e4eb436ecb0bcc4d88cb50930ef378e (diff)
downloadlanes-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.lua13
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 @@
1lanes = require('lanes')
2
3local linda = lanes.linda()
4
5local 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...
9print( pcall(linda.send,linda, 'test', "oh boy"))
10print( pcall(linda.send,linda, 'test', coro))
11res = linda:receive('test')
12print( res)
13-- linda:send( 'test', coro)