aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/connection/internal_channel.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2016-01-24 16:00:15 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2016-01-24 16:00:15 +0100
commit53a9da4cf2d99c73bb2b71c84098c9fe32d3cedc (patch)
tree631e1157afb6bfe4e0e5c4ffdc4a69ef6a713f1b /actioncable/lib/action_cable/connection/internal_channel.rb
parent3bebb65e86baac1792499c94679a4d4a0cc4acbd (diff)
parent503fe757c7f5f917deab95acdcd421a1dede05c7 (diff)
downloadrails-53a9da4cf2d99c73bb2b71c84098c9fe32d3cedc.tar.gz
rails-53a9da4cf2d99c73bb2b71c84098c9fe32d3cedc.tar.bz2
rails-53a9da4cf2d99c73bb2b71c84098c9fe32d3cedc.zip
Merge pull request #23152 from matthewd/actioncable-concurrent
Eliminate the EventMachine dependency
Diffstat (limited to 'actioncable/lib/action_cable/connection/internal_channel.rb')
-rw-r--r--actioncable/lib/action_cable/connection/internal_channel.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actioncable/lib/action_cable/connection/internal_channel.rb b/actioncable/lib/action_cable/connection/internal_channel.rb
index 54ed7672d2..27826792b3 100644
--- a/actioncable/lib/action_cable/connection/internal_channel.rb
+++ b/actioncable/lib/action_cable/connection/internal_channel.rb
@@ -15,14 +15,14 @@ module ActionCable
@_internal_subscriptions ||= []
@_internal_subscriptions << [ internal_channel, callback ]
- EM.next_tick { pubsub.subscribe(internal_channel, callback) }
+ Concurrent.global_io_executor.post { pubsub.subscribe(internal_channel, callback) }
logger.info "Registered connection (#{connection_identifier})"
end
end
def unsubscribe_from_internal_channel
if @_internal_subscriptions.present?
- @_internal_subscriptions.each { |channel, callback| EM.next_tick { pubsub.unsubscribe(channel, callback) } }
+ @_internal_subscriptions.each { |channel, callback| Concurrent.global_io_executor.post { pubsub.unsubscribe(channel, callback) } }
end
end