class Async::Wrapper

def monitor(interests, duration = nil)

Monitor the io for the given events
def monitor(interests, duration = nil)
	unless @monitor
		@monitor = @reactor.register(@io, interests)
	else
		@monitor.interests = interests
	end
	
	@monitor.value = Fiber.current
	
	# If the user requested an explicit timeout for this operation:
	if duration
		@reactor.timeout(duration) do
			Task.yield
		end
	else
		Task.yield
	end
	
	return true
ensure
	@monitor.value = nil if @monitor
end