mm-std 0.3.15__py3-none-any.whl → 0.3.16__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.
@@ -1,7 +1,9 @@
|
|
1
|
+
import asyncio
|
1
2
|
import threading
|
2
3
|
from dataclasses import dataclass, field
|
3
4
|
from datetime import datetime
|
4
5
|
from logging import Logger
|
6
|
+
from typing import Any
|
5
7
|
|
6
8
|
import anyio
|
7
9
|
|
@@ -26,6 +28,7 @@ class AsyncScheduler:
|
|
26
28
|
self.tasks: dict[str, AsyncScheduler.TaskInfo] = {}
|
27
29
|
self._running: bool = False
|
28
30
|
self._cancel_scope: anyio.CancelScope | None = None
|
31
|
+
self._main_task: asyncio.Task[Any] | None = None
|
29
32
|
self._thread: threading.Thread | None = None
|
30
33
|
self._logger = logger
|
31
34
|
|
@@ -82,8 +85,9 @@ class AsyncScheduler:
|
|
82
85
|
return
|
83
86
|
self._running = True
|
84
87
|
self._logger.debug("Starting AsyncScheduler")
|
85
|
-
|
86
|
-
|
88
|
+
|
89
|
+
# Create a task in the current event loop
|
90
|
+
self._main_task = asyncio.create_task(self._start_all_tasks())
|
87
91
|
|
88
92
|
def stop(self) -> None:
|
89
93
|
"""
|
@@ -20,11 +20,11 @@ mm_std/types_.py,sha256=9FGd2q47a8M9QQgsWJR1Kq34jLxBAkYSoJuwih4PPqg,257
|
|
20
20
|
mm_std/zip.py,sha256=axzF1BwcIygtfNNTefZH7hXKaQqwe-ZH3ChuRWr9dnk,396
|
21
21
|
mm_std/concurrency/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
mm_std/concurrency/async_decorators.py,sha256=tJ5u-_G9mAF3zrFr1aBUhYh03rB-K_6oiDKGdmGdlGk,449
|
23
|
-
mm_std/concurrency/async_scheduler.py,sha256
|
23
|
+
mm_std/concurrency/async_scheduler.py,sha256=-crLjrFwRJSNGdyhU3brCvqP7EPPLwEVfZFbDCBe9Qo,3995
|
24
24
|
mm_std/concurrency/async_task_runner.py,sha256=D4fD_hwSVy55sM_-U1_sdVYlkahnQeigXdMfbIi8Rpc,4492
|
25
25
|
mm_std/concurrency/sync_decorators.py,sha256=syCQBOmN7qPO55yzgJB2rbkh10CVww376hmyvs6e5tA,1080
|
26
26
|
mm_std/concurrency/sync_scheduler.py,sha256=j4tBL_cBI1spr0cZplTA7N2CoYsznuORMeRN8rpR6gY,2407
|
27
27
|
mm_std/concurrency/sync_task_runner.py,sha256=s5JPlLYLGQGHIxy4oDS-PN7O9gcy-yPZFoNm8RQwzcw,1780
|
28
|
-
mm_std-0.3.
|
29
|
-
mm_std-0.3.
|
30
|
-
mm_std-0.3.
|
28
|
+
mm_std-0.3.16.dist-info/METADATA,sha256=tXTemaQ7P5DOoxtamgJjtXkXVrhzvHOaaNyH4PavjYg,410
|
29
|
+
mm_std-0.3.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
30
|
+
mm_std-0.3.16.dist-info/RECORD,,
|
File without changes
|