|
1 | 1 | """ |
2 | | -Async concurrency primitives used by the async data source, event processor, and |
3 | | -data system. Each wraps a piece of fiddly asyncio plumbing (timeout-aware waits, |
4 | | -queue exception normalization, an interval-from-start repeating task, a bounded |
5 | | -task set) that callers would otherwise inline repeatedly. The sync code uses the |
6 | | -equivalent stdlib/SDK primitives (``threading.Event``/``Lock``, ``queue.Queue``, |
7 | | -``RepeatingTask``, ``FixedThreadPool``) directly, so these have no sync twin. |
| 2 | +Async concurrency helpers used by the async data source, event processor, and |
| 3 | +data system. Each helper wraps one piece of asyncio setup so callers do not |
| 4 | +repeat it: timeout-aware waits, queue timeout/capacity exceptions, a repeating |
| 5 | +task, and a bounded task set. The sync code uses the standard-library and SDK |
| 6 | +equivalents (``threading.Event``/``Lock``, ``queue.Queue``, ``RepeatingTask``, |
| 7 | +``FixedThreadPool``) directly, so it has no matching helpers. |
8 | 8 | """ |
9 | 9 |
|
10 | 10 | import asyncio |
@@ -130,9 +130,9 @@ async def join_handle(handle: TaskHandle, timeout: float) -> None: |
130 | 130 |
|
131 | 131 |
|
132 | 132 | class AsyncCallbackScheduler: |
133 | | - """Bridges sync notification paths to async callbacks: ``call`` schedules |
134 | | - a coroutine callback onto the event loop captured at construction time, |
135 | | - logging any unhandled exception. Safe to invoke from any thread.""" |
| 133 | + """Schedules a coroutine callback onto the event loop that was running when |
| 134 | + this object was created. ``call`` runs the callback and logs any unhandled |
| 135 | + exception. Safe to call from any thread.""" |
136 | 136 |
|
137 | 137 | def __init__(self): |
138 | 138 | self._loop = asyncio.get_running_loop() |
|
0 commit comments