Class EventMachine::Completion
In: lib/em/completion.rb
Parent: Object

Methods

Included Modules

EventMachine::Deferrable

Attributes

state  [R] 
value  [R] 

Public Class methods

Public Instance methods

Callbacks are called when you enter (or are in) a :succeeded state.

Remove a callback. N.B. Some callbacks cannot be deleted. Usage is NOT recommended, this is an anti-pattern.

Remove an errback. N.B. Some errbacks cannot be deleted. Usage is NOT recommended, this is an anti-pattern.

Enter a new state, setting the result value if given. If the state is one of :succeeded or :failed, then :completed callbacks will also be called.

Indicates that we‘ve reached some kind of completion state, by default this is :succeeded or :failed. Due to these semantics, the :completed state is reserved for internal use.

Completions are called when you enter (or are in) either a :failed or a :succeeded state. They are stored as a special (reserved) state called :completed.

Completion states simply returns a list of completion states, by default this is :succeeded and :failed.

Errbacks are called when you enter (or are in) a :failed state.

Enter the :failed state, setting the result value if given.

set_deferred_failure(*args)

Alias for fail

set_deferred_status(state, *args)

Alias for change_state

set_deferred_success(*args)

Alias for succeed

Statebacks are called when you enter (or are in) the named state.

Enter the :succeeded state, setting the result value if given.

Schedule a time which if passes before we enter a completion state, this deferrable will be failed with the given arguments.

[Validate]