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.



14
15
16
17
# File 'actioncable/lib/action_cable/subscription_adapter/async.rb', line 14

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

Instance Method Details

#add_subscriberObject



19
20
21
# File 'actioncable/lib/action_cable/subscription_adapter/async.rb', line 19

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

#invoke_callbackObject



23
24
25
# File 'actioncable/lib/action_cable/subscription_adapter/async.rb', line 23

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