Skip to content

Commit ebb63d3

Browse files
Synchronize incrementing of completed_task_count
1 parent c541df4 commit ebb63d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/concurrent/executor/ruby_thread_pool_executor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def worker_died(worker)
103103

104104
# @!visibility private
105105
def worker_task_completed
106-
@completed_task_count += 1
106+
synchronize { @completed_task_count += 1 }
107107
end
108108

109109
private

0 commit comments

Comments
 (0)