Python Forum

Full Version: GUI Threading
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Since I also dealt with the gui freezing issue, i found the thread from Yoriz
(https://python-forum.io/Thread-Tkinter-H...ng-the-gui)

I'm using the solution with the
thread_pool_executor
and the
.after 
method, since the last sol. with decorators is kind of hard to understand for me.


Therefore I've a question.
Everytime I press the button ( like in Yoritz example ), a operation will be added to the thread_pool, which will be handelded one after one.

Is this always the same thread ?

What makes more sense, to add a second thread_pool, or to increase the max_workes ? ( the more i choose, the more tasks can be handelded at the "same" time as it seems.

Example what would make more sense. Additional thread_pool, or increase the worker.
Thing is, I've a method (X1) which runs in a while loop in a thread.
Queue: X1

When I add a new task to the queue, X1 would block all other tasks ( with only 1 worker ).
Queue: X1 | X2 - will never run


Hope I described my question detailed enough.

Thanks :)