File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change @@ -72,15 +72,6 @@ module Concurrent
72
72
expect ( latch . wait ( 0.1 ) ) . to be false
73
73
end
74
74
75
- it 'does not interrupt waiting threads when event is unset' do
76
- latch = CountDownLatch . new ( 1 )
77
- Thread . new { subject . wait . tap { latch . count_down } }
78
- subject . reset
79
- expect ( latch . wait ( 0.1 ) ) . to be false
80
- subject . set
81
- expect ( latch . wait ( 0.1 ) ) . to be true
82
- end
83
-
84
75
it 'returns true when called on an unset event' do
85
76
expect ( subject . reset ) . to be true
86
77
end
@@ -99,33 +90,6 @@ module Concurrent
99
90
end
100
91
end
101
92
102
- #context '#pulse' do
103
-
104
- #it 'triggers an unset event' do
105
- #subject.reset
106
- #latch = CountDownLatch.new(1)
107
- #Thread.new{ subject.wait.tap{ puts "Boom!"; latch.count_down } }
108
- #subject.pulse
109
- #latch.wait(0.1).should be_true
110
- #end
111
-
112
- #it 'does nothing with a set event' do
113
- #subject.set
114
- #latch = CountDownLatch.new(1)
115
- #Thread.new{ subject.wait.tap{ latch.count_down } }
116
- #subject.pulse
117
- #latch.wait(0.1).should be_true
118
- #end
119
-
120
- #it 'leaves the event in the unset state' do
121
- #latch = CountDownLatch.new(1)
122
- #Thread.new{ subject.wait.tap{ latch.count_down } }
123
- #subject.pulse
124
- #latch.wait(0.1)
125
- #subject.should_not be_set
126
- #end
127
- #end
128
-
129
93
context '#wait' do
130
94
131
95
it 'returns immediately when the event has been set' do
You can’t perform that action at this time.
0 commit comments