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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#start_semaphoreObject (readonly)

Returns the value of attribute start_semaphore.



65
66
67
# File 'lib/kamal/sshkit_with_ext.rb', line 65

def start_semaphore
  @start_semaphore
end

Instance Method Details

#configure(&block) ⇒ Object



67
68
69
70
71
72
73
# File 'lib/kamal/sshkit_with_ext.rb', line 67

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