Skip to content

Commit ec0201f

Browse files
committed
update docstring
1 parent 0a127bb commit ec0201f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pyper/_core/util/worker_pool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88

99

1010
class WorkerPool:
11-
"""A context for fine-grained thread/process management and error handling.
11+
"""A unified wrapper to the ThreadPoolExecutor and ProcessPoolExecutor classes.
1212
1313
1. Spins up thread/process workers and maintains a reference to each
14-
2. Provides a mechanism to capture and propagate errors to the main thread/process
15-
3. Ensures safe tear-down of all workers
14+
2. Ensures safe tear-down of all workers and propagates errors
1615
"""
1716
shutdown_event: Union[mpsync.Event, threading.Event]
1817
_executor: Union[cf.ProcessPoolExecutor, cf.ThreadPoolExecutor]
@@ -25,6 +24,7 @@ def __enter__(self):
2524
def __exit__(self, et, ev, tb):
2625
self._executor.__exit__(et, ev, tb)
2726
for future in self._futures:
27+
# Resolve the future and raise any errors inside
2828
future.result()
2929

3030
def submit(self, func, /, *args, **kwargs):

0 commit comments

Comments
 (0)