Class: Async::Notification::Signal

Inherits:
Struct
  • Object
show all
Defined in:
lib/async/notification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



21
22
23
# File 'lib/async/notification.rb', line 21

def value
  @value
end

#waitingObject

Returns the value of attribute waiting

Returns:

  • (Object)

    the current value of waiting



21
22
23
# File 'lib/async/notification.rb', line 21

def waiting
  @waiting
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/async/notification.rb', line 22

def alive?
	true
end

#transferObject



26
27
28
29
30
# File 'lib/async/notification.rb', line 26

def transfer
	waiting.each do |fiber|
		fiber.transfer(value) if fiber.alive?
	end
end