class Async::LimitedQueue

def enqueue *items

def enqueue *items
	while !items.empty?
		while limited?
			@full.wait
		end
		
		available = @limit - @items.size
		@items.concat(items.shift(available))
		
		self.signal unless self.empty?
	end
end