class Async::Notification

A synchronization primative, which allows fibers to wait until a notification is received. Does not block the task which signals the notification. Waiting tasks are resumed on next iteration of the reactor.

def signal(value = nil, task: Task.current)

Returns:
  • (void) -
def signal(value = nil, task: Task.current)
	return if @waiting.empty?
	
	task.reactor << Signal.new(@waiting, value)
	
	@waiting = []
	
	return nil
end