# File lib/net/ssh/ruby_compat.rb, line 34 34: def self.io_select(*params) 35: # It should be safe to wrap calls in a mutex when the timeout is 0 36: # (that is, the call is not supposed to block). 37: # We leave blocking calls unprotected to avoid causing deadlocks. 38: # This should still catch the main case for Capistrano users. 39: if params[3] == 0 40: SELECT_MUTEX.synchronize do 41: IO.select(*params) 42: end 43: else 44: IO.select(*params) 45: end 46: end