-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
Hello all
I am currently hitting some performance issue on a GUI app that uses PyQT5 and asyncio as backend.
After multiple test I figured out that CPU is 100% used when asyncio.open_connection is used
import asyncio
import sys
from PyQt5.QtWidgets import QApplication
from qasync import QEventLoop
async def start_client():
reader, writer = await asyncio.open_connection('127.0.0.1', 45678)
while True:
print("LOOP")
await asyncio.sleep(2)
if name == 'main':
app = QApplication(sys.argv)
loop = QEventLoop()
loop.create_task(start_client())
loop.run_forever()
When running above code, CPU usage is 100%. If loop = asyncio.get_event_loop() it's used, this issue is not seen
Python 3.9.0
PyQt5 5.15.2
qasync 0.13.0
Do you have any idea why this is happening?
Thank you
frederikaalund
Metadata
Metadata
Assignees
Labels
No labels