Skip to content

Commit

Permalink
v0.23.2: Troubleshoot cross-platform time, async, & multiprocessing e…
Browse files Browse the repository at this point in the history
…rrors.
  • Loading branch information
rmlibre committed Jun 1, 2024
1 parent f89c5ef commit 9eb1869
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions aiootp/asynchs/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@


from threading import Thread
from collections import deque
import concurrent.futures.thread as thread
from _thread import get_ident as get_thread_id
from concurrent.futures import ThreadPoolExecutor
Expand All @@ -39,13 +40,14 @@ class Threads(ConcurrencyInterface):
class _Manager:
"""
This type is for parity with the `Processes` class' use of the
`multiprocessing.Manager`. It returns a list so state can be
passed around from spawned threads to calling code.
`multiprocessing.Manager`. It returns an atomic list-like
container so state can be passed around from spawned threads to
calling code.
"""

@staticmethod
def list():
return []
def list() -> t.Sequence[t.Any]:
return deque(maxlen=1)

_default_probe_delay: t.PositiveRealNumber = 0.001
_pool: t.PoolExecutorType = ThreadPoolExecutor()
Expand Down

0 comments on commit 9eb1869

Please sign in to comment.