From ba9571e1ace2e9a41c3460f7d5eaef17178d637d Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Wed, 29 Jun 2016 23:15:16 -0700 Subject: Periodic timers: delegate async instance_exec to the worker pool --- actioncable/lib/action_cable/channel/periodic_timers.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'actioncable/lib/action_cable/channel') diff --git a/actioncable/lib/action_cable/channel/periodic_timers.rb b/actioncable/lib/action_cable/channel/periodic_timers.rb index dab604440f..41511312fc 100644 --- a/actioncable/lib/action_cable/channel/periodic_timers.rb +++ b/actioncable/lib/action_cable/channel/periodic_timers.rb @@ -64,9 +64,7 @@ module ActionCable def start_periodic_timer(callback, every:) connection.server.event_loop.timer every do - connection.worker_pool.async_invoke connection do - instance_exec(&callback) - end + connection.worker_pool.async_exec self, connection: connection, &callback end end -- cgit v1.2.3