Class: Celluloid::AsyncCall

Inherits:
Call
  • Object
show all
Defined in:
lib/celluloid/calls.rb

Overview

Asynchronous calls don't wait for a response

Instance Attribute Summary

Attributes inherited from Call

#arguments, #block, #method

Instance Method Summary collapse

Methods inherited from Call

#check, #execute_block_on_receiver, #initialize, #simulated_inspect_dump

Constructor Details

This class inherits a constructor from Celluloid::Call

Instance Method Details

#dispatch(obj) ⇒ Object


135
136
137
138
139
140
141
142
143
# File 'lib/celluloid/calls.rb', line 135

def dispatch(obj)
  CallChain.current_id = Celluloid.uuid
  super(obj)
rescue AbortError => ex  # Swallow aborted async calls, as they indicate the sender made a mistake

  Logger.debug("#{obj.class}: async call `#@method` aborted!\n#{Logger.format_exception(ex.cause)}")
ensure
  CallChain.current_id = nil
end