Sha256: 34807d1baab989255d7f83581387a195fe819ed08922ba85ac9e245a007bfcb9

Contents?: true

Size: 636 Bytes

Versions: 145

Compression:

Stored size: 636 Bytes

Contents

# frozen_string_literal: true

require "action_cable/subscription_adapter/inline"

module ActionCable
  module SubscriptionAdapter
    class Async < Inline # :nodoc:
      private
        def new_subscriber_map
          AsyncSubscriberMap.new(server.event_loop)
        end

        class AsyncSubscriberMap < SubscriberMap
          def initialize(event_loop)
            @event_loop = event_loop
            super()
          end

          def add_subscriber(*)
            @event_loop.post { super }
          end

          def invoke_callback(*)
            @event_loop.post { super }
          end
        end
    end
  end
end

Version data entries

145 entries across 141 versions & 10 rubygems

Version Path
actioncable-5.2.0 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.0.rc2 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.0.rc1 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.0.beta2 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.0.beta1 lib/action_cable/subscription_adapter/async.rb