Files

Class/Module Index [+]

Quicksearch

Concurrent::Edge::BlockedPromise

@abstract @!visibility private

Public Class Methods

new(future, blocked_by_futures, countdown) click to toggle source
# File lib/concurrent/edge/future.rb, line 990
def initialize(future, blocked_by_futures, countdown)
  initialize_blocked_by(blocked_by_futures)
  @Countdown = AtomicFixnum.new countdown

  super(future)
  @BlockedBy.each { |f| f.add_callback :pr_callback_notify_blocked, self }
end

Public Instance Methods

blocked_by() click to toggle source

!visibility private for inspection only

# File lib/concurrent/edge/future.rb, line 1017
def blocked_by
  @BlockedBy
end
inspect() click to toggle source
# File lib/concurrent/edge/future.rb, line 1021
def inspect
  "#{to_s[0..-2]} blocked_by:[#{ blocked_by.map(&:to_s).join(', ')}]>"
end
on_done(future) click to toggle source

@api private

# File lib/concurrent/edge/future.rb, line 999
def on_done(future)
  countdown   = process_on_done(future)
  completable = completable?(countdown)

  if completable
    on_completable(future)
    # futures could be deleted from blocked_by one by one here, but that would be too expensive,
    # it's done once when all are done to free the reference
    clear_blocked_by!
  end
end
touch() click to toggle source
# File lib/concurrent/edge/future.rb, line 1011
def touch
  blocked_by.each(&:touch)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.