xoscar 0.4.5__cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 0.4.6__cp312-cp312-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=VBE6NGqxBQ98kZBu6a7orT-YY5EExPhmLhuWKxATIdw,9042
4
- xoscar-0.4.5.dist-info/WHEEL,sha256=sLizzaCm5RO_U5e_F5zOShQNJ3TeuZ7GEwyo10nwIfE,153
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=FQA_IP5OHiav3q2Og3AWQg3Ygtgyj5yQpbJBGMOgbg0,9042
4
+ xoscar-0.4.6.dist-info/WHEEL,sha256=sLizzaCm5RO_U5e_F5zOShQNJ3TeuZ7GEwyo10nwIfE,153
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
@@ -44,7 +44,7 @@ xoscar/backends/context.py,sha256=Vr_PibRxYCDQ_gYK7r-BOlw9TXw8VQbFsVTH7K7mHPk,15
44
44
  xoscar/backends/__init__.py,sha256=VHEBQcUWM5bj027W8EUf9PiJUAP7JoMrRw3Tsvy5ySw,643
45
45
  xoscar/backends/core.py,sha256=rXJ73IC5lgERXCWvVrDEEyGAILlwVJs7XIWBCFUEVCc,10166
46
46
  xoscar/backends/allocate_strategy.py,sha256=tC1Nbq2tJohahUwd-zoRYHEDX65wyuX8tmeY45uWj_w,4845
47
- xoscar/backends/pool.py,sha256=Z7Wdab9dBF3SdQpmzgZhY0d09oTvg5gpFgzYH7vuc4w,59841
47
+ xoscar/backends/pool.py,sha256=prpyQzJMp5ujFHaSnyhltlSFsnTxXh9D0pPzU6CCCb4,59864
48
48
  xoscar/backends/router.py,sha256=mhSvM5KVfV882jricVcpyxAqHEvhS4zL6ivczC6fOTE,7746
49
49
  xoscar/backends/message.pyx,sha256=uyzilPc_7SqNwGUL4U-Zbfqku8bfZyRW_Lt_S3I_LEU,17930
50
50
  xoscar/backends/config.py,sha256=EG26f0GwX_f4dAhwTW77RBjiK9h8R_3JrD-rBF1bAq8,4984
@@ -62,7 +62,7 @@ xoscar/backends/communication/socket.py,sha256=_1tuBZrSmdEC6c6QIj_7JQh23ruIIQPwy
62
62
  xoscar/backends/communication/ucx.py,sha256=_Dp9Ld2MWIa1txSGMnmfYwJDT0esxS-GOd2FQ4BdHiM,19960
63
63
  xoscar/backends/indigen/driver.py,sha256=VGzkacYKykegW5qhCuhx01gdgBZEKJjNIyfNCnA6Nm8,952
64
64
  xoscar/backends/indigen/__init__.py,sha256=tKHP5ClzedBRBpZsLRVErR3EUNbbDm4CY4u0rCFJr44,685
65
- xoscar/backends/indigen/pool.py,sha256=mWYkOP4VVoUsXFgfpwruPuWblF6Waan5vxit8B-9_oQ,16852
65
+ xoscar/backends/indigen/pool.py,sha256=v0Ps79W0WyeFSt2YxCJnh7q_1dnRQmo9887gcW3pNoc,17226
66
66
  xoscar/backends/indigen/backend.py,sha256=znl_fZzWGEtLH8hZ9j9Kkf0fva25jEem2_KO7I1RVvc,1612
67
67
  xoscar/aio/file.py,sha256=PBtkLp-Q7XtYl-zk00s18TtgIrkNr60J3Itf66ctO1o,1486
68
68
  xoscar/aio/lru.py,sha256=rpXCqSLtPV5xnWtd6uDwQQFGgIPEgvmWEQDkPNUx9cM,6311
File without changes