Class: Async::Condition::Signal

Inherits:
Struct
  • Object
show all
Defined in:
lib/async/condition.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



73
74
75
# File 'lib/async/condition.rb', line 73

def value
  @value
end

#waitingObject

Returns the value of attribute waiting

Returns:

  • (Object)

    the current value of waiting



73
74
75
# File 'lib/async/condition.rb', line 73

def waiting
  @waiting
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


74
75
76
# File 'lib/async/condition.rb', line 74

def alive?
	true
end

#resumeObject



78
79
80
81
82
# File 'lib/async/condition.rb', line 78

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