File tree Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -50,27 +50,6 @@ module Concurrent
50
50
var . value = 0
51
51
expect ( var . instance_variable_get ( :@storage ) . keys . size ) . to be == 1
52
52
end
53
-
54
- # TODO this test is really bad, but better than nothing.
55
- it 'does not leave values behind when bind is not used' do
56
- # TODO find out why it fails from the begging sometimes, hence the 3 tries
57
- tries = Array . new ( 3 ) do
58
- var = ThreadLocalVar . new ( 0 )
59
- 10 . times . map do |i |
60
- Thread . new { var . value = i ; var . value }
61
- end . each ( &:join )
62
- var . value = 0
63
- # TODO find out why long sleep is necessary, does it take longer for threads to be collected?
64
- sleep 1
65
- if rbx?
66
- GC . run true # force GC run
67
- else
68
- GC . start
69
- end
70
- var . instance_variable_get ( :@storage ) . keys . size
71
- end
72
- expect ( tries . any? { |v | v == 1 } ) . to be_truthy
73
- end
74
53
end
75
54
end
76
55
You can’t perform that action at this time.
0 commit comments