1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actioncable/lib/action_cable/subscription_adapter/async.rb

23 lines
529 B
Ruby
Raw Normal View History

require 'action_cable/subscription_adapter/inline'
module ActionCable
module SubscriptionAdapter
class Async < Inline # :nodoc:
private
def subscriber_map
@subscriber_map ||= AsyncSubscriberMap.new
end
class AsyncSubscriberMap < SubscriberMap
def add_subscriber(*)
Concurrent.global_io_executor.post { super }
end
def invoke_callback(*)
Concurrent.global_io_executor.post { super }
end
end
end
end
end