Class: Concurrent::Edge::CompletableEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/concurrent/edge/future.rb

Overview

A Event which can be completed by user.

Instance Method Summary collapse

Methods inherited from Event

#chain, #chain_completable, #completed?, #default_executor, #delay, #initialize, #inspect, #on_completion, #on_completion!, #pending?, #set, #state, #then_select, #to_s, #unscheduled?, #wait, #with_default_executor, #zip

Constructor Details

This class inherits a constructor from Concurrent::Edge::Event

Instance Method Details

#complete(raise_on_reassign = true) ⇒ Object

Complete the Event, ‘raise` if already completed



834
835
836
# File 'lib/concurrent/edge/future.rb', line 834

def complete(raise_on_reassign = true)
  complete_with COMPLETED, raise_on_reassign
end

#hide_completableObject



838
839
840
# File 'lib/concurrent/edge/future.rb', line 838

def hide_completable
  EventWrapperPromise.new(self, @DefaultExecutor).event
end