Class: Celluloid::Call::Async

Inherits:
Celluloid::Call show all
Defined in:
lib/celluloid/call/async.rb

Overview

Asynchronous calls don’t wait for a response

Instance Attribute Summary

Attributes inherited from Celluloid::Call

#arguments, #block, #method

Instance Method Summary collapse

Methods inherited from Celluloid::Call

#check, #execute_block_on_receiver, #initialize

Constructor Details

This class inherits a constructor from Celluloid::Call

Instance Method Details

#dispatch(obj) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/celluloid/call/async.rb', line 5

def dispatch(obj)
  Internals::CallChain.current_id = Celluloid.uuid
  super(obj)
rescue AbortError => ex
  # Swallow aborted async calls, as they indicate the sender made a mistake
  # rubocop:disable Metrics/LineLength
  Internals::Logger.debug("#{obj.class}: async call `#{@method}` aborted!\n#{Internals::Logger.format_exception(ex.cause)}")
  # rubocop:enable Metrics/LineLength
ensure
  Internals::CallChain.current_id = nil
end