-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When using asyncio, we can find the blocking code like this:
import asyncio
import time
async def main():
time.sleep(1) # Block event loop
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.set_debug(True) # Enable debug
loop.slow_callback_duration = 0.1
loop.run_until_complete(main())Executing <Task finished coro=<main() [...]> took 1.016 seconds
However, when using qasync, no output is printed even if there's blocking inside the event loop. I'm using macOS on Apple Silicon.
from qasync import QEventLoop
import time
async def main():
time.sleep(1) # Block event loop
if __name__ == "__main__":
...
loop = QEventLoop(app)
loop.set_debug(True) # Enable debug
loop.slow_callback_duration = 0.1
loop.run_until_complete(main())Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working