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-6.0.5.1 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.8.1 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.8 lib/action_cable/subscription_adapter/async.rb
actioncable-6.0.5 lib/action_cable/subscription_adapter/async.rb
actioncable-6.1.6 lib/action_cable/subscription_adapter/async.rb
actioncable-7.0.3 lib/action_cable/subscription_adapter/async.rb
actioncable-7.0.2.4 lib/action_cable/subscription_adapter/async.rb
actioncable-6.1.5.1 lib/action_cable/subscription_adapter/async.rb
actioncable-6.0.4.8 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.7.1 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.7 lib/action_cable/subscription_adapter/async.rb
actioncable-6.1.5 lib/action_cable/subscription_adapter/async.rb
actioncable-7.0.2.3 lib/action_cable/subscription_adapter/async.rb
actioncable-6.1.4.7 lib/action_cable/subscription_adapter/async.rb
actioncable-6.0.4.7 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.6.3 lib/action_cable/subscription_adapter/async.rb
actioncable-7.0.2.2 lib/action_cable/subscription_adapter/async.rb
actioncable-6.1.4.6 lib/action_cable/subscription_adapter/async.rb
actioncable-6.0.4.6 lib/action_cable/subscription_adapter/async.rb
actioncable-5.2.6.2 lib/action_cable/subscription_adapter/async.rb