Method: Async::Semaphore#release

Defined in:
lib/async/semaphore.rb

#releaseObject

Release the semaphore. Must match up with a corresponding call to acquire. Will release waiting fibers in FIFO order.



94
95
96
97
98
99
100
# File 'lib/async/semaphore.rb', line 94

def release
	@count -= 1
	
	while (@limit - @count) > 0 and node = @waiting.first
		node.resume
	end
end