Skip to content

Commit e1b23b2

Browse files
committed
pool/process: improve docstrings
1 parent 0dee462 commit e1b23b2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pebble/pool/process.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def update_status(self):
236236
self.update_workers()
237237

238238
def update_tasks(self):
239-
"""Handles timing out Tasks."""
239+
"""Handles cancelled and timing out Tasks."""
240240
for task in self.task_manager.timeout_tasks():
241241
if self.worker_manager.maybe_stop_worker(task.worker_id):
242242
self.task_manager.task_done(
@@ -405,7 +405,8 @@ def new_worker(self):
405405

406406
def maybe_stop_worker(self, worker_id: int) -> bool:
407407
"""Try to stop the assigned worker.
408-
Returns True if the worker did not exist or could be stopped.
408+
Returns True if the worker was stopped successfully
409+
or did already expire by its own.
409410
410411
"""
411412
with self.workers_channel.lock(block=False) as locked:

0 commit comments

Comments
 (0)