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



40
41
42
# File 'lib/async/notification.rb', line 40

def value
  @value
end

#waitingObject

Returns the value of attribute waiting

Returns:

  • (Object)

    the current value of waiting



40
41
42
# File 'lib/async/notification.rb', line 40

def waiting
  @waiting
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/async/notification.rb', line 41

def alive?
	true
end

#resumeObject



45
46
47
48
49
# File 'lib/async/notification.rb', line 45

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