Skip to content

Commit ab9914a

Browse files
committed
include unit test for dict of pools
1 parent 382eae4 commit ab9914a

File tree

2 files changed

+378
-4
lines changed

2 files changed

+378
-4
lines changed

openeo/extra/job_management/_thread_worker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class _TaskThreadPool:
194194
Defaults to 2.
195195
"""
196196

197-
def __init__(self, max_workers: int = 2, name: str = None):
197+
def __init__(self, max_workers: int = 1, name: str = 'default'):
198198
self._executor = concurrent.futures.ThreadPoolExecutor(max_workers=max_workers)
199199
self._future_task_pairs: List[Tuple[concurrent.futures.Future, Task]] = []
200200
self._name = name
@@ -335,3 +335,5 @@ def shutdown(self, pool_name: Optional[str] = None) -> None:
335335
def list_pools(self) -> List[str]:
336336
"""List all active pool names."""
337337
return list(self._pools.keys())
338+
339+

0 commit comments

Comments
 (0)