Python Forum
How can I implement a multitasking process in Python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I implement a multitasking process in Python?
#1
speaking about Tkinter and the multitasking concept, I always had an issue with my GUI softwares. in the last one for example, I have a simple function. it takes around 4 seconds to accomplish its task, but until the task is not completed, the GUI will be stuck. the function takes just some information for a TreeViw widget placed in another window not opened yet. these information will be apply directly when the user will open the new window, only if he want of course, it's not necessary open it to use the software (it just a setting window). as you can understand, except the setting window, my function has not dipendeces from the rest of the GUI, so how can I run it in parallel with the rest of the software in rder to see my GUI start quikly? what is the best approch to do this kind of things? unfortunately I don't know nothing about the multitasking in python.
Reply
#2
Please, if subject matter is similar or related to previous threads, don't make a new thread, ask questions in new posts instead.

Before you start using multitasking in tkinter, you should play around with it in simple non-GUI applications.

for multitaksing see: https://docs.python.org/3/library/concurrency.html

for multiprocessing, see: https://docs.python.org/3/library/multiprocessing.html

also search google for example code.
Reply


Forum Jump:

User Panel Messages

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