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



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

def value
  @value
end

#waitingObject

Returns the value of attribute waiting

Returns:

  • (Object)

    the current value of waiting



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

def waiting
  @waiting
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/async/notification.rb', line 24

def alive?
	true
end

#transferObject



28
29
30
31
32
# File 'lib/async/notification.rb', line 28

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