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)
15
15
16
16
describe 'Concurrent::Actress' do
17
17
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!
23
19
end
24
20
25
21
def terminate_actors ( *actors )
Original file line number Diff line number Diff line change @@ -22,9 +22,15 @@ def rbx?
22
22
RbConfig ::CONFIG [ 'ruby_install_name' ] =~ /^rbx$/i
23
23
end
24
24
25
+ def do_no_reset!
26
+ @do_not_reset = true
27
+ end
28
+
29
+ @@killed = false
30
+
25
31
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
28
34
end
29
35
30
36
def kill_rogue_threads ( warning = true )
@@ -33,6 +39,7 @@ def kill_rogue_threads(warning = true)
33
39
Thread . list . each do |thread |
34
40
thread . kill unless thread == Thread . current
35
41
end
42
+ @@killed = true
36
43
end
37
44
38
45
extend self
You can’t perform that action at this time.
0 commit comments