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/appendud.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/appendud.lua')
-rw-r--r-- | tests/appendud.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/appendud.lua b/tests/appendud.lua index afea0e9..65d0798 100644 --- a/tests/appendud.lua +++ b/tests/appendud.lua | |||
@@ -31,18 +31,18 @@ local _ud = { | |||
31 | 31 | ||
32 | 32 | ||
33 | function appendud(tab, ud) | 33 | function appendud(tab, ud) |
34 | io.stderr:write "Starting" | 34 | io.stderr:write "Starting" |
35 | tab:beginupdate() set_finalizer( function() tab:endupdate() end ) | 35 | tab:beginupdate() set_finalizer( function() tab:endupdate() end ) |
36 | ud:lock() set_finalizer( function() ud:unlock() end ) | 36 | ud:lock() set_finalizer( function() ud:unlock() end ) |
37 | for i = 1,#ud do | 37 | for i = 1,#ud do |
38 | tab[#tab+1] = ud[i] | 38 | tab[#tab+1] = ud[i] |
39 | end | 39 | end |
40 | io.stderr:write "Ending" | 40 | io.stderr:write "Ending" |
41 | return tab -- need to return 'tab' since we're running in a separate thread | 41 | return tab -- need to return 'tab' since we're running in a separate thread |
42 | -- ('tab' is passed over lanes by value, not by reference) | 42 | -- ('tab' is passed over lanes by value, not by reference) |
43 | end | 43 | end |
44 | 44 | ||
45 | local t,err= lanes.gen( appendud )( _tab, _ud ) -- create & launch a thread | 45 | local t,err= lanes.gen( "io", appendud )( _tab, _ud ) -- create & launch a thread |
46 | assert(t) | 46 | assert(t) |
47 | assert(not err) | 47 | assert(not err) |
48 | 48 | ||