Method: Async::Semaphore#initialize

Defined in:
lib/async/semaphore.rb

#initialize(limit = 1, parent: nil) ⇒ Semaphore

Returns a new instance of Semaphore.



26
27
28
29
30
31
32
# File 'lib/async/semaphore.rb', line 26

def initialize(limit = 1, parent: nil)
	@count = 0
	@limit = limit
	@waiting = []
	
	@parent = parent
end