class RuboCop::Cop::ThreadSafety::NewThread
Thread.new { do_work }
# bad
@example
Let a framework like Sidekiq handle the threads.
Avoid starting new threads.
def on_send(node)
def on_send(node) new_thread?(node) { add_offense(node) } end
Thread.new { do_work }
# bad
@example
Let a framework like Sidekiq handle the threads.
Avoid starting new threads.
def on_send(node) new_thread?(node) { add_offense(node) } end