class Async::Wrapper

def monitor(interests)

def monitor(interests)
	unless @monitor
		@monitor = @task.register(@io, interests)
	else
		@monitor.interests = interests
	end
	
	@monitor.value = Fiber.current
	
	yield
	
ensure
	@monitor.value = nil if @monitor
end