AsyncSourceAsyncNotification

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.

Nested

Definitions

def signal(value = nil)

Signal to a given task that it should resume operations.

Signature

returns Boolean

if a task was signalled.

Implementation

def signal(value = nil)
	return false if empty?
	
	Fiber.scheduler.push Signal.new(self.exchange, value)
	
	return true
end

Discussion