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



38
39
40
# File 'lib/async/notification.rb', line 38

def value
  @value
end

#waitingObject

Returns the value of attribute waiting

Returns:

  • (Object)

    the current value of waiting



38
39
40
# File 'lib/async/notification.rb', line 38

def waiting
  @waiting
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


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

def alive?
	true
end

#resumeObject



43
44
45
46
47
# File 'lib/async/notification.rb', line 43

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