Sha256: 084d67a7b933b875ee7b472f31e02408a3154b57f48629c983f86950a4ef98cb

Contents?: true

Size: 623 Bytes

Versions: 2

Compression:

Stored size: 623 Bytes

Contents

module Celluloid
  class Call
    # Asynchronous calls don't wait for a response
    class Async < Call
      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
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
celluloid-0.18.0 lib/celluloid/call/async.rb
celluloid-0.18.0.pre2 lib/celluloid/call/async.rb