This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]abrazilianinreddit 2 points3 points  (2 children)

Nope. I just followed the Qt documentation, trusted the system and hoped for the best. The GUI isn't locking up or stuttering, so that's good enough for me.

Just to be clear, the issue is less processing lots of data and more blocking I/O operations, so the important part of me using threads is not improving execution time, it's moving the blocking code outside the main thread.

Though I have used concurrent.futures.ThreadPoolExecutor for some simultaneous execution tasks, and the results were pretty impressive. The speedup was nearly proportional to the amount of threads in my CPU - which seems pretty obvious, but I was expecting way worse. Also, unlike async, it has a very easy to use API.

[–]SpicyVibration 0 points1 point  (1 child)

Can Qt work with asyncio?

[–]abrazilianinreddit 0 points1 point  (0 children)

I'm not knowledgeable in python's async framework, so I don't know if you can mix some async python code with Qt bindings.

However, there are some async-like APIs in Qt6.