lib/ffmprb/util/threaded_io_buffer.rb in ffmprb-0.11.4 vs lib/ffmprb/util/threaded_io_buffer.rb in ffmprb-0.12.1
- old
+ new
@@ -4,11 +4,11 @@
module Util
# TODO the events mechanism is currently unused (and commented out) => synchro mechanism not needed
class ThreadedIoBuffer
- # XXX include Synchro
+ # TODO? include Synchro
include ProcVis::Node
class << self
attr_accessor :blocks_max
@@ -278,12 +278,14 @@
if timeouts == 2 * logged_timeouts
Ffmprb.logger.warn "A little bit of timeout (>#{timeouts*ThreadedIoBuffer.timeout}s idle) with #{ThreadedIoBuffer.blocks_max}x#{ThreadedIoBuffer.block_size}b blocks (buffering #{reader_input!.path}->...; #{@outputs.reject(&:io).size}/#{@outputs.size} unopen/total)"
logged_timeouts = timeouts
end
- retry unless timeouts >= ThreadedIoBuffer.timeout_limit # NOTE the queue has probably overflown
+ retry unless # NOTE the queue has probably overflown
+ timeouts >= ThreadedIoBuffer.timeout_limit
- @reader_failed ||= Error.new("the writer has failed with timeout limit while queuing") # NOTE screw the race condition
+ @reader_failed ||= # NOTE screw the race condition
+ Error.new("the writer has failed with timeout limit while queuing")
# timeout!
fail Error, "Looks like we're stuck (>#{ThreadedIoBuffer.timeout_limit*ThreadedIoBuffer.timeout}s idle) with #{ThreadedIoBuffer.blocks_max}x#{ThreadedIoBuffer.block_size}b blocks (buffering #{reader_input!.path}->...)..."
end
end.empty?
end