lib/rbbt/persist.rb in rbbt-util-5.13.18 vs lib/rbbt/persist.rb in rbbt-util-5.13.19

- old
+ new

@@ -287,38 +287,38 @@ case res when IO res = tee_stream(res, path, type, res.respond_to?(:callback)? res.callback : nil, res.respond_to?(:abort_callback)? res.abort_callback : nil) ConcurrentStream.setup res do begin - lockfile.unlock if File.exists? lockfile.path and lockfile.locked? - rescue + lockfile.unlock #if File.exists? lockfile.path and lockfile.locked? + rescue Exception Log.medium "Lockfile exception: " << $!.message end end res.abort_callback = Proc.new do begin - lockfile.unlock if File.exists? lockfile.path and lockfile.locked? - rescue + lockfile.unlock #if File.exists? lockfile.path and lockfile.locked? + rescue Exception Log.medium "Lockfile exception: " << $!.message end end raise KeepLocked.new res when TSV::Dumper stream = res.stream res = tee_stream(stream, path, type) ConcurrentStream.setup res do begin stream.callback - lockfile.unlock if File.exists? lockfile.path and lockfile.locked? - rescue + lockfile.unlock #if File.exists? lockfile.path and lockfile.locked? + rescue Exception Log.medium "Lockfile exception: " << $!.message end end res.abort_callback = Proc.new do begin stream.abort - lockfile.unlock if File.exists? lockfile.path and lockfile.locked? - rescue + lockfile.unlock #if File.exists? lockfile.path and lockfile.locked? + rescue Exception Log.medium "Lockfile exception: " << $!.message end end raise KeepLocked.new res end