Method: Async::Notification#signal
- Defined in:
- lib/async/notification.rb
permalink #signal(value = nil, task: Task.current) ⇒ Object
Signal to a given task that it should resume operations.
13 14 15 16 17 18 19 |
# File 'lib/async/notification.rb', line 13 def signal(value = nil, task: Task.current) return if @waiting.empty? Fiber.scheduler.push Signal.new(self.exchange, value) return nil end |