Async::IO SourceAsyncIONotification

class Notification

A cross-reactor/process notification pipe.

Definitions

def wait

Wait for signal to be called.

Implementation

def wait
	wrapper = Async::IO::Generic.new(@input)
	wrapper.read(1)
ensure
	# Remove the wrapper from the reactor.
	wrapper.reactor = nil
end

def signal

Signal to a given task that it should resume operations.

Implementation

def signal
	wrapper = Async::IO::Generic.new(@output)
	wrapper.write(".")
ensure
	wrapper.reactor = nil
end