mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update guide and actioncable tests to use appropriate concurrent-ruby class
This commit is contained in:
parent
0b5c7210af
commit
868a63c695
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue