xoscar 0.4.5__cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 0.4.6__cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.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.

@@ -16,6 +16,7 @@
16
16
  from __future__ import annotations
17
17
 
18
18
  import asyncio
19
+ import atexit
19
20
  import concurrent.futures as futures
20
21
  import configparser
21
22
  import contextlib
@@ -29,6 +30,7 @@ import sys
29
30
  import threading
30
31
  import uuid
31
32
  from dataclasses import dataclass
33
+ from multiprocessing import util
32
34
  from types import TracebackType
33
35
  from typing import List, Optional
34
36
 
@@ -79,6 +81,19 @@ logger = logging.getLogger(__name__)
79
81
  _init_main_suspended_local = threading.local()
80
82
 
81
83
 
84
+ def _terminate_children():
85
+ for c in multiprocessing.active_children():
86
+ try:
87
+ c.terminate()
88
+ except Exception:
89
+ pass
90
+
91
+
92
+ if util:
93
+ # Import multiprocessing.util to register _exit_function at exit.
94
+ atexit.register(_terminate_children)
95
+
96
+
82
97
  def _patch_spawn_get_preparation_data():
83
98
  try:
84
99
  from multiprocessing import spawn as mp_spawn
@@ -309,6 +324,7 @@ class MainActorPool(MainActorPoolBase):
309
324
  raise
310
325
  finally:
311
326
  status_queue.put(process_status)
327
+ status_queue.cancel_join_thread()
312
328
  await pool.join()
313
329
 
314
330
  async def append_sub_pool(
xoscar/backends/pool.py CHANGED
@@ -377,7 +377,7 @@ class AbstractActorPool(ABC):
377
377
  try:
378
378
  await channel.send(result)
379
379
  except (ChannelClosed, ConnectionResetError):
380
- if not self._stopped.is_set():
380
+ if not self._stopped.is_set() and not channel.closed:
381
381
  raise
382
382
  except Exception as ex:
383
383
  logger.exception(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xoscar
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: Python actor framework for heterogeneous computing.
5
5
  Home-page: http://github.com/xorbitsai/xoscar
6
6
  Author: Qin Xuye
@@ -1,7 +1,7 @@
1
- xoscar-0.4.5.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
2
- xoscar-0.4.5.dist-info/RECORD,,
3
- xoscar-0.4.5.dist-info/METADATA,sha256=R6Zr_mb9l4xkf5mOtPo6XBDzFlR_XjHbq-oOrmdc3uM,9042
4
- xoscar-0.4.5.dist-info/WHEEL,sha256=OyU_a3_0g4nHrDfscT3ntE6UTOgLWum2-dKsAfzpQqc,150
1
+ xoscar-0.4.6.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
2
+ xoscar-0.4.6.dist-info/RECORD,,
3
+ xoscar-0.4.6.dist-info/METADATA,sha256=mDlEVxaFePvqmKl3aoY9-bymXVVOYdX_Tw4S6qgSzso,9042
4
+ xoscar-0.4.6.dist-info/WHEEL,sha256=OyU_a3_0g4nHrDfscT3ntE6UTOgLWum2-dKsAfzpQqc,150
5
5
  xoscar/errors.py,sha256=wBlQOKsXf0Fc4skN39tDie0YZT-VIAuLNRgoDl2pZcA,1241
6
6
  xoscar/nvutils.py,sha256=qmW4mKLU0WB2yCs198ccQOgLL02zB7Fsa-AotO3NOmg,20412
7
7
  xoscar/utils.py,sha256=jUw6OICZUPBbmS1b3GE4vLctJf6fCKXrYtLtBuK-Oqc,16483
@@ -42,7 +42,7 @@ xoscar/backends/context.py,sha256=Vr_PibRxYCDQ_gYK7r-BOlw9TXw8VQbFsVTH7K7mHPk,15
42
42
  xoscar/backends/__init__.py,sha256=VHEBQcUWM5bj027W8EUf9PiJUAP7JoMrRw3Tsvy5ySw,643
43
43
  xoscar/backends/core.py,sha256=rXJ73IC5lgERXCWvVrDEEyGAILlwVJs7XIWBCFUEVCc,10166
44
44
  xoscar/backends/allocate_strategy.py,sha256=tC1Nbq2tJohahUwd-zoRYHEDX65wyuX8tmeY45uWj_w,4845
45
- xoscar/backends/pool.py,sha256=Z7Wdab9dBF3SdQpmzgZhY0d09oTvg5gpFgzYH7vuc4w,59841
45
+ xoscar/backends/pool.py,sha256=prpyQzJMp5ujFHaSnyhltlSFsnTxXh9D0pPzU6CCCb4,59864
46
46
  xoscar/backends/router.py,sha256=mhSvM5KVfV882jricVcpyxAqHEvhS4zL6ivczC6fOTE,7746
47
47
  xoscar/backends/message.pyx,sha256=uyzilPc_7SqNwGUL4U-Zbfqku8bfZyRW_Lt_S3I_LEU,17930
48
48
  xoscar/backends/message.cpython-39-aarch64-linux-gnu.so,sha256=MI1amaTd1CBvZoihZGBBA0O-u2ugw8iw4djHM4CoNA8,3076360
@@ -60,7 +60,7 @@ xoscar/backends/communication/socket.py,sha256=_1tuBZrSmdEC6c6QIj_7JQh23ruIIQPwy
60
60
  xoscar/backends/communication/ucx.py,sha256=_Dp9Ld2MWIa1txSGMnmfYwJDT0esxS-GOd2FQ4BdHiM,19960
61
61
  xoscar/backends/indigen/driver.py,sha256=VGzkacYKykegW5qhCuhx01gdgBZEKJjNIyfNCnA6Nm8,952
62
62
  xoscar/backends/indigen/__init__.py,sha256=tKHP5ClzedBRBpZsLRVErR3EUNbbDm4CY4u0rCFJr44,685
63
- xoscar/backends/indigen/pool.py,sha256=mWYkOP4VVoUsXFgfpwruPuWblF6Waan5vxit8B-9_oQ,16852
63
+ xoscar/backends/indigen/pool.py,sha256=v0Ps79W0WyeFSt2YxCJnh7q_1dnRQmo9887gcW3pNoc,17226
64
64
  xoscar/backends/indigen/backend.py,sha256=znl_fZzWGEtLH8hZ9j9Kkf0fva25jEem2_KO7I1RVvc,1612
65
65
  xoscar/aio/file.py,sha256=PBtkLp-Q7XtYl-zk00s18TtgIrkNr60J3Itf66ctO1o,1486
66
66
  xoscar/aio/lru.py,sha256=rpXCqSLtPV5xnWtd6uDwQQFGgIPEgvmWEQDkPNUx9cM,6311
File without changes