File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,7 @@ def backdoor(&block)
1515
1616 describe 'Concurrent::Actress' do
1717 prepend_before do
18- @do_not_reset = true
19- @@isolated_from_other_tests ||= begin
20- sleep 0.1
21- true
22- end
18+ do_no_reset!
2319 end
2420
2521 def terminate_actors ( *actors )
Original file line number Diff line number Diff line change @@ -22,9 +22,15 @@ def rbx?
2222 RbConfig ::CONFIG [ 'ruby_install_name' ] =~ /^rbx$/i
2323 end
2424
25+ def do_no_reset!
26+ @do_not_reset = true
27+ end
28+
29+ @@killed = false
30+
2531 def reset_gem_configuration
26- return if @do_not_reset
27- Concurrent . instance_variable_get ( :@configuration ) . value = Concurrent :: Configuration . new
32+ Concurrent . instance_variable_get ( :@configuration ) . value = Concurrent :: Configuration . new if @@killed
33+ @@killed = false
2834 end
2935
3036 def kill_rogue_threads ( warning = true )
@@ -33,6 +39,7 @@ def kill_rogue_threads(warning = true)
3339 Thread . list . each do |thread |
3440 thread . kill unless thread == Thread . current
3541 end
42+ @@killed = true
3643 end
3744
3845 extend self
You can’t perform that action at this time.
0 commit comments