Then, issuing a GET /sse throws the following error:
RuntimeError: Task <Task pending name='sse_starlette.sse.EventSourceResponse.__call__.<locals>.wrap' coro=<EventSourceResponse.__call__.<locals>.wrap() running at /home/duranda/devel/fastapi-example/venv/lib/python3.8/site-packages/sse_starlette/sse.py:230> cb=[TaskGroup._spawn.<locals>.task_done() at /home/duranda/devel/fastapi-example/venv/lib/python3.8/site-packages/anyio/_backends/_asyncio.py:726]> got Future <Future pending> attached to a different loop
While further investigating on https://github.com/sysid/sse-starlette/issues/48, I tried to run the stream_generator example as I expected it to exhibit the same behavior.
First, I had to fix a queue declaration:
Then, issuing a
GET /sse
throws the following error: