Showing 5 of 5 total issues
Method process
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def process(monitors) monitors.each do |monitor| io = monitor.io stream = monitor.value
- Read upRead up
Method flush_write_buffer
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def flush_write_buffer @write_lock.synchronize do loop do return true if @write_buffer.empty? && @write_head.nil? @write_head = @write_buffer.pop if @write_head.nil?
- Read upRead up
Method run
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def run loop do if stopped? @nio.close break
- Read upRead up
Avoid too many return
statements within this method. Open
return true if env['rack.url_scheme'] == 'https'
Method spawn
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def spawn return if @thread && @thread.status @spawn_mutex.synchronize do return if @thread && @thread.status
- Read upRead up