123456789_123456789_123456789_123456789_123456789_

Class: Concurrent::Promises::AnyFulfilledFuturePromise

Constant Summary

InternalStates - Included

PENDING, RESERVED, RESOLVED

Class Attribute Summary

Class Method Summary

AnyResolvedFuturePromise - Inherited

BlockedPromise - Inherited

AbstractPromise - Inherited

Synchronization::Object - Inherited

.atomic_attribute?, .atomic_attributes,
.attr_atomic

Creates methods for reading and writing to a instance variable with volatile (Java) semantic as .attr_volatile does.

.attr_volatile

Creates methods for reading and writing (as attr_accessor does) to a instance variable with volatile (Java) semantic.

.ensure_safe_initialization_when_final_fields_are_present

For testing purposes, quite slow.

.new

Has to be called by children.

.safe_initialization!, .define_initialize_atomic_fields

Synchronization::AbstractObject - Inherited

Instance Method Summary

Constructor Details

This class inherits a constructor from Concurrent::Promises::AnyResolvedFuturePromise

Instance Method Details

#resolvable?(countdown, event_or_future, index) ⇒ Boolean (private)

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/promises.rb', line 2088

def resolvable?(countdown, event_or_future, index)
  (event_or_future.is_a?(Event) ? event_or_future.resolved? : event_or_future.fulfilled?) ||
      # inlined super from BlockedPromise
      countdown.zero?
end