Skip to content

Commit f072146

Browse files
committed
Fix broadcast spec bug from rubinius
1 parent de789ad commit f072146

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spec/concurrent/atomic/condition_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ module Concurrent
272272
it 'wakes up all threads' do
273273
mutex = Mutex.new
274274
go = CountDownLatch.new(2)
275+
275276
threads = Array.new(2) do
276277
Thread.new do
277278
mutex.synchronize do
@@ -280,12 +281,12 @@ module Concurrent
280281
end
281282
end
282283
end
284+
283285
go.wait
284286
mutex.synchronize { subject.broadcast }
287+
joined = threads.map(&:join)
285288

286-
threads.each do |t|
287-
expect(t.join(5)).to eq t
288-
end
289+
expect(joined).to eq threads
289290
end
290291
end
291292
end

0 commit comments

Comments
 (0)