lib/async/variable.rb in async-2.15.3 vs lib/async/variable.rb in async-2.16.0
- old
+ new
@@ -29,26 +29,25 @@
self.freeze
condition.signal(value)
end
+ alias value= resolve
+
# Whether the value has been resolved.
#
# @returns [Boolean] Whether the value has been resolved.
def resolved?
@condition.nil?
end
# Wait for the value to be resolved.
#
# @returns [Object] The resolved value.
- def value
+ def wait
@condition&.wait
return @value
end
- # Alias for {#value}.
- def wait
- self.value
- end
+ alias value wait
end
end