-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
im using rwlock on marzban project.
we have some test case with fastapi test client to make sure everything is ok
when we need to access lock in multiple request we get this error
self = <aiorwlock._RWLockCore object at 0x7f0d7471a570>
def _get_loop(self) -> asyncio.AbstractEventLoop:
"""
From: https://github.com/python/cpython/blob/3.12/Lib/asyncio/mixins.py
"""
loop = asyncio.get_event_loop()
if self._loop is None:
with _global_lock:
if self._loop is None:
self._loop = loop
if loop is not self._loop:
> raise RuntimeError(f'{self!r} is bound to a different event loop')
E RuntimeError: <aiorwlock._RWLockCore object at 0x7f0d7471a570> is bound to a different event loop
.venv/lib/python3.12/site-packages/aiorwlock/__init__.py:54: RuntimeError
i replaced aiorwlock
with asyncio.lock
temporary and problem solved commit
Metadata
Metadata
Assignees
Labels
No labels