2 years ago
#70957
John Bachir
If I make a Thread in a controller action, do I need to wrap the inner code in an executor?
I have a controller action where I make a thread with Thread.new
.
Do I need to wrap the inner code with an executor?
I think this part of the docs is saying I should "if your application manually delegates work to other threads, such as via Thread.new or Concurrent Ruby features that use thread pools, you should immediately wrap the block" https://guides.rubyonrails.org/threading_and_code_execution.html#wrapping-application-code
ruby-on-rails
concurrency
rails-activerecord
0 Answers
Your Answer