summaryrefslogtreecommitdiff
path: root/tests/finalizer.lua
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2012-09-10 20:41:03 +0200
committerBenoit Germain <bnt.germain@gmail.com>2012-09-10 20:41:03 +0200
commit242feeb342f68999b02c2b8dc4614abefdab8431 (patch)
tree904a3898035f89e5656036a0e7d454f560eb0455 /tests/finalizer.lua
parente37191ab11102ee784dc88578165074d2d0a2fff (diff)
downloadlanes-242feeb342f68999b02c2b8dc4614abefdab8431.tar.gz
lanes-242feeb342f68999b02c2b8dc4614abefdab8431.tar.bz2
lanes-242feeb342f68999b02c2b8dc4614abefdab8431.zip
version 3.3.0
* lane.status can return "killed" if lane was forcefully killed with lanes:cancel() * lane:join(): return nil, "killed" if called on a killed lane. * lane[<n>]: produces [1] = nil, [2] = "killed" if the lane was killed * lane:join(): fixed an assertion in debug builds when joining a lane forcefully cancelled with lane:cancel( <x>, true). * indexing a lane with a string other than "join", "cancel" or "status" raises an error. * fixed configure() to correctly apply defaults when they are missing from the provided settings * added a shutdown_timeout to control the duration Lanes will wait for graceful termination of running lanes at application shutdown. Default is 0.25. Among other things, fixes issue #31.
Diffstat (limited to 'tests/finalizer.lua')
-rw-r--r--tests/finalizer.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/finalizer.lua b/tests/finalizer.lua
index 6f186ab..dc9ed34 100644
--- a/tests/finalizer.lua
+++ b/tests/finalizer.lua
@@ -31,6 +31,7 @@ local function lane()
31 io.stderr:write( "File "..FN.." created\n" ) 31 io.stderr:write( "File "..FN.." created\n" )
32 32
33 if which==0 then 33 if which==0 then
34 print "you loose"
34 error("aa") -- exception here; the value needs NOT be a string 35 error("aa") -- exception here; the value needs NOT be a string
35 end 36 end
36 37
@@ -55,6 +56,7 @@ cleanup= function(err)
55 end 56 end
56 57
57 local _,err2= os.remove(FN) 58 local _,err2= os.remove(FN)
59 print( "file removal result: ", tostring( err2))
58 assert(not err2) -- if this fails, it will be shown in the calling script 60 assert(not err2) -- if this fails, it will be shown in the calling script
59 -- as an error from the lane itself 61 -- as an error from the lane itself
60 62