From 868a63c6955cfc11ce11f1cc3011ddbf2a78261f Mon Sep 17 00:00:00 2001 From: luizkowalski Date: Wed, 15 Sep 2021 17:50:49 +0200 Subject: [PATCH] Update guide and actioncable tests to use appropriate concurrent-ruby class --- actioncable/test/client_test.rb | 2 +- guides/source/threading_and_code_execution.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actioncable/test/client_test.rb b/actioncable/test/client_test.rb index 5866ca7733..ddc6da8412 100644 --- a/actioncable/test/client_test.rb +++ b/actioncable/test/client_test.rb @@ -201,7 +201,7 @@ class ClientTest < ActionCable::TestCase end def concurrently(enum) - enum.map { |*x| Concurrent::Future.execute { yield(*x) } }.map(&:value!) + enum.map { |*x| Concurrent::Promises.future { yield(*x) } }.map(&:value!) end def test_single_client diff --git a/guides/source/threading_and_code_execution.md b/guides/source/threading_and_code_execution.md index a49824a241..7724a6b0d4 100644 --- a/guides/source/threading_and_code_execution.md +++ b/guides/source/threading_and_code_execution.md @@ -289,7 +289,7 @@ Another example, using Concurrent Ruby: ```ruby Rails.application.executor.wrap do futures = 3.times.collect do |i| - Concurrent::Future.execute do + Concurrent::Promises.future do Rails.application.executor.wrap do # do work here end