lib/rbbt/persist.rb in rbbt-util-5.20.22 vs lib/rbbt/persist.rb in rbbt-util-5.20.23
- old
+ new
@@ -215,13 +215,18 @@
Log.exception $!
raise $!
end
end
ConcurrentStream.setup(out, :threads => saver_thread, :filename => path)
+
out.callback = callback
out.abort_callback = abort_callback
out.lockfile = stream.lockfile if stream.respond_to? :lockfile and stream.lockfile
+
+ stream.callback = callback
+ stream.abort_callback = abort_callback
+
out
end
class << self
alias tee_stream tee_stream_thread
@@ -237,11 +242,11 @@
callback = stream.respond_to?(:callback)? stream.callback : nil
abort_callback = stream.respond_to?(:abort_callback)? stream.abort_callback : nil
# This is to avoid calling the callbacks twice, since they have been
# moved to the new 'res' stream
- stream.callback = nil
- stream.abort_callback = nil
+ #stream.callback = nil
+ #stream.abort_callback = nil
res = tee_stream(stream, path, type, callback, abort_callback, lockfile)
res.lockfile = lockfile