Skip to content

Commit

Permalink
chore: Pass a var to thread
Browse files Browse the repository at this point in the history
  • Loading branch information
route committed Feb 6, 2024
1 parent 5b8b323 commit f188df6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ferrum/utils/thread.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module Thread
module_function

def spawn(abort_on_exception: true)
::Thread.new(abort_on_exception) do
::Thread.current.abort_on_exception = abort_on_exception
::Thread.new(abort_on_exception) do |whether_abort_on_exception|
::Thread.current.abort_on_exception = whether_abort_on_exception
::Thread.current.report_on_exception = true if ::Thread.current.respond_to?(:report_on_exception=)

yield
Expand Down

0 comments on commit f188df6

Please sign in to comment.