class Async::Pool::Controller

def acquire_existing_resource

If there are resources that are in use, wait until they are released.
Acquire an existing resource with zero usage.
def acquire_existing_resource
	while @resources.any?
		@resources.each do |resource, usage|
			if usage == 0
				return resource
			end
		end
		
		@notification.wait
	end
	
	# Only when the pool has been completely drained, return nil:
	return nil
end