Update guide and actioncable tests to use appropriate concurrent-ruby class

This commit is contained in:
luizkowalski 2021-09-15 17:50:49 +02:00
parent 0b5c7210af
commit 868a63c695
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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