Skip to content

Commit

Permalink
Workaround to fix compatibility with Python 3.10, refs aio-libs#358
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Oct 8, 2021
1 parent 0dbbdc9 commit a608228
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions janus/__init__.py
Expand Up @@ -36,6 +36,8 @@ def __init__(self, maxsize: int = 0) -> None:
self._all_tasks_done = threading.Condition(self._sync_mutex)

self._async_mutex = asyncio.Lock()
# Workaround for issue #358:
getattr(self._async_mutex, '_get_loop', lambda: None)()
self._async_not_empty = asyncio.Condition(self._async_mutex)
self._async_not_full = asyncio.Condition(self._async_mutex)
self._finished = asyncio.Event()
Expand Down

0 comments on commit a608228

Please sign in to comment.