Skip to content

Commit e8c6f8a

Browse files
committed
Removed unnecessary and unsafe queue clearing in TimerSet.kill
1 parent 8c77ef8 commit e8c6f8a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/concurrent/executor/timer_set.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,8 @@ def <<(task)
7474
self
7575
end
7676

77-
# For a timer, #kill is like an orderly shutdown, except we need to manually
78-
# (and destructively) clear the queue first
77+
# @!macro executor_method_shutdown
7978
def kill
80-
mutex.synchronize { @queue.clear }
81-
# possible race condition
8279
shutdown
8380
end
8481

0 commit comments

Comments
 (0)