lib/rbbt/persist.rb in rbbt-util-5.11.3 vs lib/rbbt/persist.rb in rbbt-util-5.11.4
- old
+ new
@@ -402,11 +402,11 @@
Log.medium "Persist create: #{ path } - #{Misc.fingerprint persist_options}"
res = yield
- if persist_options[:no_load] == :stream
+ if persist_options[:no_load] == :stream
case res
when IO
res = tee_stream(res, path, type, res.respond_to?(:callback)? res.callback : nil)
ConcurrentStream.setup res do
begin
@@ -418,10 +418,9 @@
raise KeepLocked.new res
when TSV::Dumper
res = tee_stream(res.stream, path, type, res.respond_to?(:callback)? res.callback : nil)
ConcurrentStream.setup res do
begin
- iii [:unlock, lockfile.path]
lockfile.unlock
rescue
Log.warn "Lockfile exception: " << $!.message
end
end