Class: ActionCable::SubscriptionAdapter::Async::AsyncSubscriberMap

Inherits:
SubscriberMap show all
Defined in:
actioncable/lib/action_cable/subscription_adapter/async.rb

Instance Method Summary collapse

Methods inherited from SubscriberMap

#add_channel, #broadcast, #remove_channel, #remove_subscriber

Constructor Details

#initialize(event_loop) ⇒ AsyncSubscriberMap

Returns a new instance of AsyncSubscriberMap.



12
13
14
15
# File 'actioncable/lib/action_cable/subscription_adapter/async.rb', line 12

def initialize(event_loop)
  @event_loop = event_loop
  super()
end

Instance Method Details

#add_subscriberObject



17
18
19
# File 'actioncable/lib/action_cable/subscription_adapter/async.rb', line 17

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

#invoke_callbackObject



21
22
23
# File 'actioncable/lib/action_cable/subscription_adapter/async.rb', line 21

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