class Async::Waiter

def first(count = nil)

@returns [Async::Task] Otherwise, the first task to complete.
@returns [Array(Async::Task)] If an integer is given, the tasks which have completed.
@parameter count [Integer | Nil] The number of tasks to wait for.
Wait for the first `count` tasks to complete.
def first(count = nil)
	minimum = count || 1
	
	while @done.size < minimum
		@finished.wait
	end
	
	return @done.shift(*count)
end