flpit 0.4.0.dev1__py3-none-any.whl → 0.4.0.dev2__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.
- flpit/task.py +10 -3
- {flpit-0.4.0.dev1.dist-info → flpit-0.4.0.dev2.dist-info}/METADATA +1 -1
- {flpit-0.4.0.dev1.dist-info → flpit-0.4.0.dev2.dist-info}/RECORD +5 -5
- {flpit-0.4.0.dev1.dist-info → flpit-0.4.0.dev2.dist-info}/WHEEL +0 -0
- {flpit-0.4.0.dev1.dist-info → flpit-0.4.0.dev2.dist-info}/licenses/LICENSE +0 -0
flpit/task.py
CHANGED
|
@@ -59,6 +59,7 @@ import socket
|
|
|
59
59
|
import threading
|
|
60
60
|
import time
|
|
61
61
|
import warnings
|
|
62
|
+
import weakref
|
|
62
63
|
from collections import deque
|
|
63
64
|
from collections.abc import AsyncGenerator, Generator
|
|
64
65
|
from dataclasses import dataclass
|
|
@@ -2411,9 +2412,15 @@ class _Runtime:
|
|
|
2411
2412
|
def __init__(self, *, min_workers: int, max_workers: int) -> None:
|
|
2412
2413
|
self._pool = _WorkerPool(self, min_workers, max_workers)
|
|
2413
2414
|
self._io = _IOReactor(self)
|
|
2414
|
-
# Pending tasks, so shutdown can cancel them.
|
|
2415
|
-
#
|
|
2416
|
-
|
|
2415
|
+
# Pending tasks, so shutdown can cancel them. The registry is weak on
|
|
2416
|
+
# purpose: a pending task that nothing references can never make
|
|
2417
|
+
# progress (anything that can resume it -- the pool queue, a running
|
|
2418
|
+
# worker, the timer, the selector, a continuation list -- holds it
|
|
2419
|
+
# strongly), so it is garbage, exactly like an abandoned
|
|
2420
|
+
# TaskCompletionSource in .NET. A strong registry would keep every
|
|
2421
|
+
# such task, and the coroutine parked on it, alive for the life of
|
|
2422
|
+
# the process.
|
|
2423
|
+
self._tasks: weakref.WeakSet[Task[Any]] = weakref.WeakSet()
|
|
2417
2424
|
self._state_lock = threading.Lock()
|
|
2418
2425
|
self._shutdown_lock = threading.Lock()
|
|
2419
2426
|
self._shutdown_requested = False
|
|
@@ -4,7 +4,7 @@ flpit/csv.py,sha256=w15QoD2Xg3jnI-NTN2EKb4vAEnku1Uy43EFY-76VYjQ,5875
|
|
|
4
4
|
flpit/flp.py,sha256=WaZnrtYdxwEOJUEBv_hXg8Uwm81h8kcH64pjDh8oJhU,1527
|
|
5
5
|
flpit/json.py,sha256=IV5xm_vRQh6WhgtRYlixb6CwX1QPK4kdnKg1C5ZjSMs,21329
|
|
6
6
|
flpit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
flpit/task.py,sha256=
|
|
7
|
+
flpit/task.py,sha256=xbEvEHDqcBcChYFgnDJURZGk0i6AwcwLfmqHEbx6O-U,109174
|
|
8
8
|
flpit/threading.py,sha256=D5TrDZ4L2u9bFMjIU8w3APUIxgMyzIgyngiAvKRPhCQ,6132
|
|
9
9
|
flpit/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
flpit/core/_grouping.py,sha256=QZNdNqXx4fcRsnun4nwkGKnst63Y10Q-rYBevof7Abw,954
|
|
@@ -14,7 +14,7 @@ flpit/core/_lookup.py,sha256=v_FC9anm6OpbQqj3DmNwOW4ppxDZY9VY5MybAvsHJsk,1641
|
|
|
14
14
|
flpit/core/_zip.py,sha256=lz5cbHcVV12UNyaOtrUd5jz-v_XI5xEp24KbnhAQZq8,259
|
|
15
15
|
flpit/core/async_linq.py,sha256=kgswFZlFHUKB2Sdpzw4pTdVLaa-Rm-Dypt5CpIhgAUc,73450
|
|
16
16
|
flpit/core/linq.py,sha256=K_XB7uhFdE_1iHiZnrYZuaGYpgxTbOrm6UUfc1_ecfU,83794
|
|
17
|
-
flpit-0.4.0.
|
|
18
|
-
flpit-0.4.0.
|
|
19
|
-
flpit-0.4.0.
|
|
20
|
-
flpit-0.4.0.
|
|
17
|
+
flpit-0.4.0.dev2.dist-info/METADATA,sha256=3Lw-R3P_ZIZ-1ajnvIxwYr6uVTuQjOEIkqj_LKqW6LI,36857
|
|
18
|
+
flpit-0.4.0.dev2.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
19
|
+
flpit-0.4.0.dev2.dist-info/licenses/LICENSE,sha256=bi5Vg_YP3Oq3jaOMQT4b7WZu0NfBcZr-nRyOExUKJrQ,1063
|
|
20
|
+
flpit-0.4.0.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|