Method: Async::Variable#resolve

Defined in:
lib/async/variable.rb

#resolve(value = true) ⇒ Object

Resolve the value.

Signals all waiting tasks.

[View source]

24
25
26
27
28
29
30
31
32
# File 'lib/async/variable.rb', line 24

def resolve(value = true)
	@value = value
	condition = @condition
	@condition = nil
	
	self.freeze
	
	condition.signal(value)
end