Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update guide to use the appropriate concurrent-ruby class #43218

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

luizkowalski
Copy link
Contributor

Summary

Concurrent Ruby's README states that Concurrent::Future is being deprecated and users should prefer using Promises factory instead. I updated the guide to reflect this

Other Information

https://github.com/ruby-concurrency/concurrent-ruby#deprecated

@rails-bot rails-bot bot added the docs label Sep 15, 2021
@luizkowalski luizkowalski changed the title Update guide to use the appropriate version of concurrent tools Update guide to use the appropriate version of concurrent ruby Sep 15, 2021
@luizkowalski luizkowalski changed the title Update guide to use the appropriate version of concurrent ruby Update guide to use the appropriate concurrent-ruby class Sep 15, 2021
@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we can also replace this usage in the test:

enum.map { |*x| Concurrent::Future.execute { yield(*x) } }.map(&:value!)
, would you mind amending the commit adding that change as well? We can keep it all in a single update. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I should've done a global search! updated as well

@rafaelfranca rafaelfranca merged commit 1d9d538 into rails:main Sep 15, 2021
@luizkowalski luizkowalski deleted the fix/documentation branch January 7, 2023 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants