You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
First of all, thanks for creating this library, it's super nice to use 👏
I have a bit of a general question about asyncio and aioredis: I'm trying to run some async code in a sync framework by implementing asgiref's async_to_sync helper function. I believe the behavior is that asgiref handles the cleaning up and closing of the event loop after the async code is done executing.
After running my code, I sometimes see this traceback spit out from nowhere 🙂 Do you have any idea what might cause it?
Task exception was never retrieved
future: <Task finished name='Task-110' coro=<Connection.disconnect() done, defined at /Users/sondrelg/.virtualenvs/project/lib/python3.10/site-packages/aioredis/connection.py:750> exception=RuntimeError("Task <Task pending name='Task-110' coro=<Connection.disconnect() running at /Users/sondrelg/.virtualenvs/project/lib/python3.10/site-packages/aioredis/connection.py:762>> got Future <Future pending> attached to a different loop")>
Traceback (most recent call last):
File "/Users/sondrelg/.virtualenvs/project/lib/python3.10/site-packages/aioredis/connection.py", line 762, in disconnect
await self._writer.wait_closed()
File "/Users/sondrelg/.pyenv/versions/3.10.0/lib/python3.10/asyncio/streams.py", line 344, in wait_closed
await self._protocol._get_close_waiter(self)
RuntimeError: Task <Task pending name='Task-110' coro=<Connection.disconnect() running at /Users/sondrelg/.virtualenvs/project/lib/python3.10/site-packages/aioredis/connection.py:762>> got Future <Future pending> attached to a different loop
Does aioredis do anything with threads that might cause it to try and access the event loop after my primary code is done executing and the event loop is closed? If so, is there a flag I can use to make things blocking, or something I can call to clean this up explicitly before returning?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
First of all, thanks for creating this library, it's super nice to use 👏
I have a bit of a general question about asyncio and aioredis: I'm trying to run some async code in a sync framework by implementing asgiref's
async_to_sync
helper function. I believe the behavior is that asgiref handles the cleaning up and closing of the event loop after the async code is done executing.After running my code, I sometimes see this traceback spit out from nowhere 🙂 Do you have any idea what might cause it?
Does aioredis do anything with threads that might cause it to try and access the event loop after my primary code is done executing and the event loop is closed? If so, is there a flag I can use to make things blocking, or something I can call to clean this up explicitly before returning?
Beta Was this translation helpful? Give feedback.
All reactions