cocoindex 0.2.0__cp313-cp313-manylinux_2_28_x86_64.whl → 0.2.1__cp313-cp313-manylinux_2_28_x86_64.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.
- cocoindex/_engine.cpython-313-x86_64-linux-gnu.so +0 -0
- cocoindex/setting.py +2 -2
- cocoindex/subprocess_exec.py +15 -1
- {cocoindex-0.2.0.dist-info → cocoindex-0.2.1.dist-info}/METADATA +1 -1
- {cocoindex-0.2.0.dist-info → cocoindex-0.2.1.dist-info}/RECORD +8 -8
- {cocoindex-0.2.0.dist-info → cocoindex-0.2.1.dist-info}/WHEEL +0 -0
- {cocoindex-0.2.0.dist-info → cocoindex-0.2.1.dist-info}/entry_points.txt +0 -0
- {cocoindex-0.2.0.dist-info → cocoindex-0.2.1.dist-info}/licenses/LICENSE +0 -0
Binary file
|
cocoindex/setting.py
CHANGED
cocoindex/subprocess_exec.py
CHANGED
@@ -22,6 +22,7 @@ import time
|
|
22
22
|
from .user_app_loader import load_user_app
|
23
23
|
from .runtime import execution_context
|
24
24
|
import logging
|
25
|
+
import multiprocessing as mp
|
25
26
|
|
26
27
|
WATCHDOG_INTERVAL_SECONDS = 10.0
|
27
28
|
|
@@ -43,6 +44,7 @@ def _get_pool() -> ProcessPoolExecutor:
|
|
43
44
|
max_workers=1,
|
44
45
|
initializer=_subprocess_init,
|
45
46
|
initargs=(_user_apps, os.getpid()),
|
47
|
+
mp_context=mp.get_context("spawn"),
|
46
48
|
)
|
47
49
|
return _pool
|
48
50
|
|
@@ -69,6 +71,7 @@ def _restart_pool(old_pool: ProcessPoolExecutor | None = None) -> None:
|
|
69
71
|
max_workers=1,
|
70
72
|
initializer=_subprocess_init,
|
71
73
|
initargs=(_user_apps, os.getpid()),
|
74
|
+
mp_context=mp.get_context("spawn"),
|
72
75
|
)
|
73
76
|
if prev_pool is not None:
|
74
77
|
# Best-effort shutdown of previous pool; letting exceptions bubble up
|
@@ -124,8 +127,19 @@ def _start_parent_watchdog(
|
|
124
127
|
|
125
128
|
def _subprocess_init(user_apps: list[str], parent_pid: int) -> None:
|
126
129
|
_start_parent_watchdog(parent_pid)
|
130
|
+
|
131
|
+
# In case any user app is already in this subprocess, e.g. the subprocess is forked, we need to avoid loading it again.
|
132
|
+
with _pool_lock:
|
133
|
+
already_loaded_apps = set(_user_apps)
|
134
|
+
|
135
|
+
loaded_apps = []
|
127
136
|
for app_target in user_apps:
|
128
|
-
|
137
|
+
if app_target not in already_loaded_apps:
|
138
|
+
load_user_app(app_target)
|
139
|
+
loaded_apps.append(app_target)
|
140
|
+
|
141
|
+
with _pool_lock:
|
142
|
+
_user_apps.extend(loaded_apps)
|
129
143
|
|
130
144
|
|
131
145
|
class _OnceResult:
|
@@ -1,9 +1,9 @@
|
|
1
|
-
cocoindex-0.2.
|
2
|
-
cocoindex-0.2.
|
3
|
-
cocoindex-0.2.
|
4
|
-
cocoindex-0.2.
|
1
|
+
cocoindex-0.2.1.dist-info/METADATA,sha256=YjOsHGGJpjD5ioS_7bQkhkVBCmgEFH2NwFxu24PAY24,12187
|
2
|
+
cocoindex-0.2.1.dist-info/WHEEL,sha256=MiVsg31QmHstfYEYlSmPQX28GRSbnR3jkYeQjhECViQ,108
|
3
|
+
cocoindex-0.2.1.dist-info/entry_points.txt,sha256=_NretjYVzBdNTn7dK-zgwr7YfG2afz1u1uSE-5bZXF8,46
|
4
|
+
cocoindex-0.2.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
5
5
|
cocoindex/__init__.py,sha256=sLpSVO5Cotgn_82lawxvXnaqfa-qj33rytWBAe2MTtU,2201
|
6
|
-
cocoindex/_engine.cpython-313-x86_64-linux-gnu.so,sha256=
|
6
|
+
cocoindex/_engine.cpython-313-x86_64-linux-gnu.so,sha256=SycSg1HF7zSe7WD-6OmvEDt0sqfQtU1w-i7hyPVZwXQ,72307128
|
7
7
|
cocoindex/auth_registry.py,sha256=PE1-kVkcyC1G2C_V7b1kvYzeq73OFQehWKQP7ln7fJ8,1478
|
8
8
|
cocoindex/cli.py,sha256=8Q2D0gI_yHorxfFC7tzV96oJAR7PtTn_T4qWLorPPoM,20675
|
9
9
|
cocoindex/convert.py,sha256=x3eYx-NQD-z9h-jmpVgUMiSTqll6Baa_SfZJF3mZSUc,22071
|
@@ -15,10 +15,10 @@ cocoindex/llm.py,sha256=Pv_cdnRngTLtuLU9AUmS8izIHhcKVnuBNolC33f9BDI,851
|
|
15
15
|
cocoindex/op.py,sha256=w9CnrCEE6P5Voo2LDvMDlYPrBQuzNC5FfOHP6WF0Buw,22241
|
16
16
|
cocoindex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
cocoindex/runtime.py,sha256=povilB3HH3y1JF-yxKwU-pD8n2WnAqyQxIgvXXHNc60,1080
|
18
|
-
cocoindex/setting.py,sha256=
|
18
|
+
cocoindex/setting.py,sha256=cuudZ2uJvS48wh-rDToPAUN7-KMjlyQ-0hWhkHMIx4U,5282
|
19
19
|
cocoindex/setup.py,sha256=7uIHKN4FOCuoidPXcKyGTrkqpkl9luL49-6UcnMxYzw,3068
|
20
20
|
cocoindex/sources.py,sha256=o57FZARXaLKuQr4nKYLj9kxXBRX3cWEfDhFG3lldxoE,2779
|
21
|
-
cocoindex/subprocess_exec.py,sha256=
|
21
|
+
cocoindex/subprocess_exec.py,sha256=qSyImpHdvkyQ7HVJPZ3L0IhJWgPARZQjCR0gXdDx-hs,8403
|
22
22
|
cocoindex/targets.py,sha256=Nfh_tpFd1goTnS_cxBjIs4j9zl3Z4Z1JomAQ1dl3Sic,2796
|
23
23
|
cocoindex/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
24
|
cocoindex/tests/test_convert.py,sha256=UsQDuz7qukT9UAU5LBv3atNTqdUVc6uW8lrmLA7ys_w,50207
|
@@ -30,4 +30,4 @@ cocoindex/typing.py,sha256=lEQYIzAGVKQp6RnhyeopY9Q7xEED7yQj3ZMxvTPblV8,14200
|
|
30
30
|
cocoindex/user_app_loader.py,sha256=o2n25y7CGw9Qrb-RN6tiNlv2YJ9YLM8NSMhJZjLhhKQ,1914
|
31
31
|
cocoindex/utils.py,sha256=hUhX-XV6XGCtJSEIpBOuDv6VvqImwPlgBxztBTw7u0U,598
|
32
32
|
cocoindex/validation.py,sha256=PZnJoby4sLbsmPv9fOjOQXuefjfZ7gmtsiTGU8SH-tc,3090
|
33
|
-
cocoindex-0.2.
|
33
|
+
cocoindex-0.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|