Closed
Description
I have a class Foo
that is an asynchronous context manager, ie it implements async def __aenter__(self)
and async def __aexit__(self, exc_type, exc, tb)
, and I use it like:
async with Foo() as f:
await f.bar()
Before adding pyqtgraph
to the project and just using regular asyncio
, it worked completely fine, but now when I use the qasync
event loop, it doesn't clean up via the __aexit__
method. Specifically, I expect it to clean up when I close the Qt window. My main function look something like this:
app = QtWidgets.QApplication(sys.argv)
loop = QEventLoop(app)
asyncio.set_event_loop(loop)
graph = MyGraph(app)
loop.create_task(main(graph))
loop.run_forever()
Edit: adding versions
PyQt5==5.15.4
pyqtgraph==0.12.1
qasync==0.15.0
Running on MacOS Catalina 10.15.7
Metadata
Metadata
Assignees
Labels
No labels