class Notification
A synchronization primitive, 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.
Signature
- public
Since Async v1.
Definitions
def signal(value = nil, task: Task.current)
Signal to a given task that it should resume operations.
Implementation
def signal(value = nil, task: Task.current)
return if @waiting.empty?
Fiber.scheduler.push Signal.new(self.exchange, value)
return nil
end