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

Use Rails.application.executor.wrap in Threads #288

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

jordan-brough
Copy link
Contributor

iiuc, when doing Threaded work in Rails we should use Rails.application.executor.wrap:
https://guides.rubyonrails.org/threading_and_code_execution.html#wrapping-application-code

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@mnovelo
Copy link
Collaborator

mnovelo commented Oct 1, 2024

@jordan-brough do you know if this also applies to when using Fibers?

@jordan-brough
Copy link
Contributor Author

@mnovelo yes, iiuc you also need to use Rails.application.executor.wrap with Fibers.

@mnovelo mnovelo merged commit 3780a5f into rails-on-services:development Oct 24, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants