class Async::Wrapper

def monitor(interests)

Parameters:
  • interests (:r | :w | :rw) -- what events to wait for.
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