Python Forum
[PyQt] How to open a program with python without freezing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] How to open a program with python without freezing
#5
Okay first and foremost -- Python is not multiprocessing when using threads due to the GIL and when you call out to Explorer you are bypassing the GIL that said when you create a thread with an endless loop within it you have to tell it to sleep periodically so that you give the processor back to the OS from time to time to handle those other events that get queued up while it is waiting for this process to pause or finish. Likewise this goes for any and all other processes that you might be running they have to "pause" every now and again (note the actual GUI generally does this naturally due to having to wait on User triggered Events to respond to).

However if you actually need multiprocessing from within Python that can be done as well by using python's multiprocessing library but it has its own set of restrictions and such (aka pros/cons)
Reply


Messages In This Thread
RE: How to open a program with python without freezing - by Denni - Aug-13-2019, 06:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Open a python program from a button Pedroski55 3 5,246 Jul-20-2020, 11:09 PM
Last Post: Pedroski55
  [Tkinter] GUI keeps freezing Fre3k 2 3,709 May-23-2020, 05:41 PM
Last Post: Fre3k
  [Tkinter] How to create a delay for AI without freezing the GUI kom2 8 6,313 May-04-2019, 02:32 PM
Last Post: Yoriz
  Gi module window freezing problem loss 0 2,282 May-05-2018, 04:42 PM
Last Post: loss

Forum Jump:

User Panel Messages

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