Skip to content

Commit 9498bfc

Browse files
committed
Added new TimerSet test.
1 parent 5e936b7 commit 9498bfc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/concurrent/executor/timer_set_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ module Concurrent
131131
expect(delta).to be_within(0.1).of((i * interval) + 0.05)
132132
end
133133
end
134+
135+
it 'continues to execute new tasks even after the queue is emptied' do
136+
10.times do |i|
137+
task = subject.post(0.1){ i }
138+
expect(task.value).to eq i
139+
sleep(0.1)
140+
end
141+
end
134142
end
135143

136144
context 'resolution' do

0 commit comments

Comments
 (0)