Module: SSHKit::Backend::Netssh::LimitConcurrentStartsClass

Included in:
SSHKit::Backend::Netssh
Defined in:
lib/dash/sshkit_with_ext.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#start_semaphore ⇒ Object (readonly)

Returns the value of attribute start_semaphore.



152
153
154
# File 'lib/dash/sshkit_with_ext.rb', line 152

def start_semaphore
  @start_semaphore
end

Instance Method Details

#configure(&block) ⇒ Object



154
155
156
157
158
159
160
# File 'lib/dash/sshkit_with_ext.rb', line 154

def configure(&block)
  super &block
  # Create this here to avoid lazy creation by multiple threads
  if config.max_concurrent_starts
    @start_semaphore = Concurrent::Semaphore.new(config.max_concurrent_starts)
  end
end