mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
b678eb57e9
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
27 lines
605 B
Ruby
27 lines
605 B
Ruby
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
|