xoscar 0.4.2__cp312-cp312-macosx_11_0_arm64.whl → 0.4.4__cp312-cp312-macosx_11_0_arm64.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 xoscar might be problematic. Click here for more details.
- xoscar/_utils.cpython-312-darwin.so +0 -0
- xoscar/backends/core.py +39 -1
- xoscar/backends/message.cpython-312-darwin.so +0 -0
- xoscar/context.cpython-312-darwin.so +0 -0
- xoscar/core.cpython-312-darwin.so +0 -0
- xoscar/serialization/core.cpython-312-darwin.so +0 -0
- {xoscar-0.4.2.dist-info → xoscar-0.4.4.dist-info}/METADATA +1 -1
- {xoscar-0.4.2.dist-info → xoscar-0.4.4.dist-info}/RECORD +10 -10
- {xoscar-0.4.2.dist-info → xoscar-0.4.4.dist-info}/WHEEL +0 -0
- {xoscar-0.4.2.dist-info → xoscar-0.4.4.dist-info}/top_level.txt +0 -0
|
Binary file
|
xoscar/backends/core.py
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
from __future__ import annotations
|
|
17
17
|
|
|
18
18
|
import asyncio
|
|
19
|
+
import atexit
|
|
19
20
|
import copy
|
|
20
21
|
import logging
|
|
21
22
|
import threading
|
|
@@ -207,6 +208,40 @@ class ActorCallerThreadLocal:
|
|
|
207
208
|
_ = [task.cancel() for task in self._clients.values()]
|
|
208
209
|
|
|
209
210
|
|
|
211
|
+
def _cancel_all_tasks(loop):
|
|
212
|
+
to_cancel = asyncio.all_tasks(loop)
|
|
213
|
+
if not to_cancel:
|
|
214
|
+
return
|
|
215
|
+
|
|
216
|
+
for task in to_cancel:
|
|
217
|
+
task.cancel()
|
|
218
|
+
|
|
219
|
+
loop.run_until_complete(asyncio.gather(*to_cancel, return_exceptions=True))
|
|
220
|
+
|
|
221
|
+
for task in to_cancel:
|
|
222
|
+
if task.cancelled():
|
|
223
|
+
continue
|
|
224
|
+
if task.exception() is not None:
|
|
225
|
+
loop.call_exception_handler(
|
|
226
|
+
{
|
|
227
|
+
"message": "unhandled exception during asyncio.run() shutdown",
|
|
228
|
+
"exception": task.exception(),
|
|
229
|
+
"task": task,
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def _safe_run_forever(loop):
|
|
235
|
+
loop.run_forever()
|
|
236
|
+
_cancel_all_tasks(loop)
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def _safe_exit_thread(loop, thread):
|
|
240
|
+
# To avoid _enter_buffered_busy: could not acquire lock
|
|
241
|
+
loop.call_soon_threadsafe(loop.stop)
|
|
242
|
+
thread.join()
|
|
243
|
+
|
|
244
|
+
|
|
210
245
|
class ActorCaller:
|
|
211
246
|
__slots__ = "_thread_local"
|
|
212
247
|
|
|
@@ -214,8 +249,11 @@ class ActorCaller:
|
|
|
214
249
|
pass
|
|
215
250
|
|
|
216
251
|
_close_loop = asyncio.new_event_loop()
|
|
217
|
-
_close_thread = threading.Thread(
|
|
252
|
+
_close_thread = threading.Thread(
|
|
253
|
+
target=_safe_run_forever, args=(_close_loop,), daemon=True
|
|
254
|
+
)
|
|
218
255
|
_close_thread.start()
|
|
256
|
+
atexit.register(_safe_exit_thread, _close_loop, _close_thread)
|
|
219
257
|
|
|
220
258
|
def __init__(self):
|
|
221
259
|
self._thread_local = threading.local()
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
xoscar-0.4.
|
|
2
|
-
xoscar-0.4.
|
|
3
|
-
xoscar-0.4.
|
|
4
|
-
xoscar-0.4.
|
|
1
|
+
xoscar-0.4.4.dist-info/RECORD,,
|
|
2
|
+
xoscar-0.4.4.dist-info/WHEEL,sha256=7Wd-yga4fjSiXpUH443rsPZpiZ4h8-uNrXJrYRW_e14,109
|
|
3
|
+
xoscar-0.4.4.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
|
|
4
|
+
xoscar-0.4.4.dist-info/METADATA,sha256=8sNSbbwMLWNK_U4dPToYPbX3J3epO77vL9ivudhzOBY,9042
|
|
5
5
|
xoscar/_utils.pyx,sha256=UR1FtYXAYKIdEWR9HulEpMbSOrkQWi6xGz63d4IQmG0,7059
|
|
6
6
|
xoscar/backend.py,sha256=is436OPkZfSpQXaoqTRVta5eoye_pp45RFgCstAk2hU,1850
|
|
7
7
|
xoscar/core.pxd,sha256=4lBq8J0kjcXcsGuvN7Kv4xcL5liHwTTFWlqyK7XAEnw,1280
|
|
@@ -10,16 +10,16 @@ xoscar/context.pxd,sha256=qKa0OyDPZtVymftSh447m-RzFZgmz8rGqQBa7qlauvc,725
|
|
|
10
10
|
xoscar/batch.py,sha256=DpArS0L3WYJ_HVPG-6hSYEwoAFY1mY2-mlC4Jp5M_Dw,7872
|
|
11
11
|
xoscar/nvutils.py,sha256=qmW4mKLU0WB2yCs198ccQOgLL02zB7Fsa-AotO3NOmg,20412
|
|
12
12
|
xoscar/constants.py,sha256=QHHSREw6uWBBjQDCFqlNfTvBZgniJPGy42KSIsR8Fqw,787
|
|
13
|
-
xoscar/core.cpython-312-darwin.so,sha256=
|
|
13
|
+
xoscar/core.cpython-312-darwin.so,sha256=7wqynIxWaVy3G8lLpEc4tLNmdqaTV10Y14aMmKXLXQk,441048
|
|
14
14
|
xoscar/__init__.py,sha256=0zX8kKaio3ZIrlzB79WybcravMJw1OxPWjDspTgJFyQ,1608
|
|
15
|
-
xoscar/context.cpython-312-darwin.so,sha256=
|
|
15
|
+
xoscar/context.cpython-312-darwin.so,sha256=2MhhRnZACTq0S3C3QLyIUaw5KlWjmqo0rOCdVWiknC4,210096
|
|
16
16
|
xoscar/api.py,sha256=3hztPoOxg8A_mlhWyWgVP7FMXG0PATA1TP4Rbaj7A-g,13327
|
|
17
17
|
xoscar/utils.py,sha256=jUw6OICZUPBbmS1b3GE4vLctJf6fCKXrYtLtBuK-Oqc,16483
|
|
18
18
|
xoscar/debug.py,sha256=9Z8SgE2WaKYQcyDo-5-DxEJQ533v7kWjrvCd28pSx3E,5069
|
|
19
19
|
xoscar/libcpp.pxd,sha256=DJqBxLFOKL4iRr9Kale5UH3rbvPRD1x5bTSOPHFpz9I,1147
|
|
20
20
|
xoscar/context.pyx,sha256=8CdgPnWcE9eOp3N600WgDQ03MCi8P73eUOGcfV7Zksg,10942
|
|
21
21
|
xoscar/errors.py,sha256=wBlQOKsXf0Fc4skN39tDie0YZT-VIAuLNRgoDl2pZcA,1241
|
|
22
|
-
xoscar/_utils.cpython-312-darwin.so,sha256=
|
|
22
|
+
xoscar/_utils.cpython-312-darwin.so,sha256=lsIkFKKoo9m7h_lAlS2yu0lsTN-l99golhT-BBJY1e0,167104
|
|
23
23
|
xoscar/core.pyx,sha256=Aqc2i8Fetsd5wRAPF4kL0ddnBZn3E2HRNCvup79BbQc,21730
|
|
24
24
|
xoscar/driver.py,sha256=498fowtJr6b3FE8FIOA_Tc1Vwx88nfZw7p0FxrML0h4,1372
|
|
25
25
|
xoscar/profiling.py,sha256=BC5OF0HzSaXv8V7w-y-B8r5gV5DgxHFoTEIF6jCMioQ,8015
|
|
@@ -43,7 +43,7 @@ xoscar/serialization/exception.py,sha256=Jy8Lsk0z-VJyEUaWeuZIwkmxqaoB-nLKMa1D15C
|
|
|
43
43
|
xoscar/serialization/pyfury.py,sha256=sifOnVMYoS82PzZEkzkfxesmMHei23k5UAUUKUyoOYQ,1163
|
|
44
44
|
xoscar/serialization/core.pxd,sha256=k4RoJgX5E5LGs4jdCQ7vvcn26MabXbrWoWhkO49X6YI,985
|
|
45
45
|
xoscar/serialization/core.pyi,sha256=-pQARSj91rt3iU4ftWGFH6jYwsSKYCT_Ya7EJsaGEjg,1874
|
|
46
|
-
xoscar/serialization/core.cpython-312-darwin.so,sha256=
|
|
46
|
+
xoscar/serialization/core.cpython-312-darwin.so,sha256=C1JbvtxHHk1psPa9xKhy3jmPvueUka3rEHNnKKzvgw0,378600
|
|
47
47
|
xoscar/serialization/__init__.py,sha256=5Y_C3cYbQJIZ09LRjeCf-jrkLma7mfN8I5bznHrdsbg,846
|
|
48
48
|
xoscar/serialization/numpy.py,sha256=5Kem87CvpJmzUMp3QHk4WeHU30FoQWTJJP2SwIcaQG0,2919
|
|
49
49
|
xoscar/serialization/cuda.py,sha256=iFUEnN4SiquBIhyieyOrfw3TnKnW-tU_vYgqOxO_DrA,3758
|
|
@@ -54,10 +54,10 @@ xoscar/backends/config.py,sha256=EG26f0GwX_f4dAhwTW77RBjiK9h8R_3JrD-rBF1bAq8,498
|
|
|
54
54
|
xoscar/backends/message.pyi,sha256=__2piPWLUQBmkDzx_nsHMOC2wHG53IKVGU_47zwgdKM,6112
|
|
55
55
|
xoscar/backends/allocate_strategy.py,sha256=tC1Nbq2tJohahUwd-zoRYHEDX65wyuX8tmeY45uWj_w,4845
|
|
56
56
|
xoscar/backends/__init__.py,sha256=VHEBQcUWM5bj027W8EUf9PiJUAP7JoMrRw3Tsvy5ySw,643
|
|
57
|
-
xoscar/backends/core.py,sha256=
|
|
57
|
+
xoscar/backends/core.py,sha256=3hWgmVYddSy341wsinYOr0yFSlICC9SBr-KQ_KeJRLw,10262
|
|
58
58
|
xoscar/backends/context.py,sha256=Vr_PibRxYCDQ_gYK7r-BOlw9TXw8VQbFsVTH7K7mHPk,15470
|
|
59
59
|
xoscar/backends/router.py,sha256=mhSvM5KVfV882jricVcpyxAqHEvhS4zL6ivczC6fOTE,7746
|
|
60
|
-
xoscar/backends/message.cpython-312-darwin.so,sha256=
|
|
60
|
+
xoscar/backends/message.cpython-312-darwin.so,sha256=x07X_vc1YySo0flCaCAoajdL-5nJAD4Xfcd7zggNiRA,361648
|
|
61
61
|
xoscar/backends/message.pyx,sha256=uyzilPc_7SqNwGUL4U-Zbfqku8bfZyRW_Lt_S3I_LEU,17930
|
|
62
62
|
xoscar/backends/pool.py,sha256=Z7Wdab9dBF3SdQpmzgZhY0d09oTvg5gpFgzYH7vuc4w,59841
|
|
63
63
|
xoscar/backends/indigen/backend.py,sha256=znl_fZzWGEtLH8hZ9j9Kkf0fva25jEem2_KO7I1RVvc,1612
|
|
File without changes
|
|
File without changes
|