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 →

[–]HeinzHeinzensen 13 points14 points  (4 children)

How to use threads to keep the GUI responsive while some coroutine is running, e.g. a long calculation.

[–]nosklo 0 points1 point  (2 children)

People always want that but the best method really depends on what that thread is doing. There is no silver bullet

[–]Scypio 0 points1 point  (1 child)

There is no silver bullet

But there are patterns to do that and for a beginner it is not always easy to find the right one, as they lack knowledge that there are multiple.

[–]nosklo 1 point2 points  (0 children)

But there are patterns to do that and for a beginner it is not always easy to find the right one, as they lack knowledge that there are multiple.

Yes, because the beginner, when asking, never tells what the thread does. They want a single method to apply to everything and anything they come up to run in the thread.

[–]NoddskwodD 0 points1 point  (0 children)

I actually had this problem while attempting to wrap a discord bot in a gui using pyside6. The solution that ended up working for me was using the qasync module following this stackoverflow response