thds.core 1.45.20251006224153__py3-none-any.whl → 1.45.20251007062722__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of thds.core might be problematic. Click here for more details.
- thds/core/parallel.py +7 -0
- {thds_core-1.45.20251006224153.dist-info → thds_core-1.45.20251007062722.dist-info}/METADATA +1 -1
- {thds_core-1.45.20251006224153.dist-info → thds_core-1.45.20251007062722.dist-info}/RECORD +6 -6
- {thds_core-1.45.20251006224153.dist-info → thds_core-1.45.20251007062722.dist-info}/WHEEL +0 -0
- {thds_core-1.45.20251006224153.dist-info → thds_core-1.45.20251007062722.dist-info}/entry_points.txt +0 -0
- {thds_core-1.45.20251006224153.dist-info → thds_core-1.45.20251007062722.dist-info}/top_level.txt +0 -0
thds/core/parallel.py
CHANGED
|
@@ -85,6 +85,10 @@ def yield_all(
|
|
|
85
85
|
same size as your iterable. If you want to throttle the number of
|
|
86
86
|
parallel tasks, you should provide your own Executor - and for
|
|
87
87
|
most mops purposes it should be a ThreadPoolExecutor.
|
|
88
|
+
|
|
89
|
+
Currently this function does not yield any results until the input iterable is exhausted,
|
|
90
|
+
even though some of the thunks may have been submitted and the workers have returned a result
|
|
91
|
+
to the local process.
|
|
88
92
|
"""
|
|
89
93
|
files.bump_limits()
|
|
90
94
|
len_or_none = try_len(thunks)
|
|
@@ -107,6 +111,9 @@ def yield_all(
|
|
|
107
111
|
with executor_cm as executor:
|
|
108
112
|
keys_onto_futures = {key: executor.submit(thunk) for key, thunk in thunks}
|
|
109
113
|
future_ids_onto_keys = {id(future): key for key, future in keys_onto_futures.items()}
|
|
114
|
+
# While concurrent.futures.as_completed accepts an iterable as input, it
|
|
115
|
+
# does not yield any completed futures until the input iterable is
|
|
116
|
+
# exhausted.
|
|
110
117
|
for i, future in enumerate(concurrent.futures.as_completed(keys_onto_futures.values()), start=1):
|
|
111
118
|
thunk_key = future_ids_onto_keys[id(future)]
|
|
112
119
|
try:
|
|
@@ -29,7 +29,7 @@ thds/core/link.py,sha256=4-9d22l_oSkKoSzlYEO-rwxO1hvvj6VETY7LwvGcX6M,5534
|
|
|
29
29
|
thds/core/logical_root.py,sha256=gWkIYRv9kNQfzbpxJaYiwNXVz1neZ2NvnvProtOn9d8,1399
|
|
30
30
|
thds/core/merge_args.py,sha256=7oj7dtO1-XVkfTM3aBlq3QlZbo8tb6X7E3EVIR-60t8,5781
|
|
31
31
|
thds/core/meta.py,sha256=Df0DxV5UzHcEsu5UCYaE1BWipMPTEXycn9Ug4cdquMk,12114
|
|
32
|
-
thds/core/parallel.py,sha256=
|
|
32
|
+
thds/core/parallel.py,sha256=wRN0rZ8OebRYHkQT-1De5MbhCqdm2H0GJmWEjo_ylKI,8535
|
|
33
33
|
thds/core/pickle_visit.py,sha256=QNMWIi5buvk2zsvx1-D-FKL7tkrFUFDs387vxgGebgU,833
|
|
34
34
|
thds/core/prof.py,sha256=5ViolfPsAPwUTHuhAe-bon7IArPGXydpGoB5uZmObDk,8264
|
|
35
35
|
thds/core/progress.py,sha256=tY8tc_6CMnu_O8DVisnsRoDpFJOw5vqyYzLhQDxsLn8,4361
|
|
@@ -74,8 +74,8 @@ thds/core/sqlite/structured.py,sha256=8t1B6XbM5NnudKEeBLsdjRVbSXXSr6iHOW0HwEAqtX
|
|
|
74
74
|
thds/core/sqlite/types.py,sha256=Zb1FtSAmC1L7QPPCV1eRnWpJuF74t9R293ai1SHtdS4,1292
|
|
75
75
|
thds/core/sqlite/upsert.py,sha256=BmKK6fsGVedt43iY-Lp7dnAu8aJ1e9CYlPVEQR2pMj4,5827
|
|
76
76
|
thds/core/sqlite/write.py,sha256=z0219vDkQDCnsV0WLvsj94keItr7H4j7Y_evbcoBrWU,3458
|
|
77
|
-
thds_core-1.45.
|
|
78
|
-
thds_core-1.45.
|
|
79
|
-
thds_core-1.45.
|
|
80
|
-
thds_core-1.45.
|
|
81
|
-
thds_core-1.45.
|
|
77
|
+
thds_core-1.45.20251007062722.dist-info/METADATA,sha256=wsEC4MEoGuF97Kz9ciN_ZoglDcKbjOyOCKR4sqy-ZTE,2216
|
|
78
|
+
thds_core-1.45.20251007062722.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
79
|
+
thds_core-1.45.20251007062722.dist-info/entry_points.txt,sha256=bOCOVhKZv7azF3FvaWX6uxE6yrjK6FcjqhtxXvLiFY8,161
|
|
80
|
+
thds_core-1.45.20251007062722.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
|
|
81
|
+
thds_core-1.45.20251007062722.dist-info/RECORD,,
|
|
File without changes
|
{thds_core-1.45.20251006224153.dist-info → thds_core-1.45.20251007062722.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{thds_core-1.45.20251006224153.dist-info → thds_core-1.45.20251007062722.dist-info}/top_level.txt
RENAMED
|
File without changes
|