aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/subscription_adapter/postgresql.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/subscription_adapter/postgresql.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/subscription_adapter/postgresql.rb')
-rw-r--r--actioncable/lib/action_cable/subscription_adapter/postgresql.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actioncable/lib/action_cable/subscription_adapter/postgresql.rb b/actioncable/lib/action_cable/subscription_adapter/postgresql.rb
index 78f8aeb599..3ce1bbed68 100644
--- a/actioncable/lib/action_cable/subscription_adapter/postgresql.rb
+++ b/actioncable/lib/action_cable/subscription_adapter/postgresql.rb
@@ -63,7 +63,7 @@ module ActionCable
case action
when :listen
pg_conn.exec("LISTEN #{pg_conn.escape_identifier channel}")
- ::EM.next_tick(&callback) if callback
+ Concurrent.global_io_executor << callback if callback
when :unlisten
pg_conn.exec("UNLISTEN #{pg_conn.escape_identifier channel}")
when :shutdown
@@ -93,7 +93,7 @@ module ActionCable
end
def invoke_callback(*)
- ::EM.next_tick { super }
+ Concurrent.global_io_executor.post { super }
end
end
end