Python Forum
[Tkinter] GUI Threading
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] GUI Threading
#1
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 :)
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020