diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2016-06-29 23:15:16 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2016-06-29 23:37:07 -0700 |
commit | ba9571e1ace2e9a41c3460f7d5eaef17178d637d (patch) | |
tree | a1767104e22002b8fea6c7c8bb0779fa84f4e5a7 /actioncable/lib/action_cable/channel | |
parent | fe054e02b29340c6d9265f9b4ea2ea7d9a872156 (diff) | |
download | rails-ba9571e1ace2e9a41c3460f7d5eaef17178d637d.tar.gz rails-ba9571e1ace2e9a41c3460f7d5eaef17178d637d.tar.bz2 rails-ba9571e1ace2e9a41c3460f7d5eaef17178d637d.zip |
Periodic timers: delegate async instance_exec to the worker pool
Diffstat (limited to 'actioncable/lib/action_cable/channel')
-rw-r--r-- | actioncable/lib/action_cable/channel/periodic_timers.rb | 4 |
1 files changed, 1 insertions, 3 deletions
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 |