Python Forum
Terminating Subprocesses and Threads while they're calculating
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Terminating Subprocesses and Threads while they're calculating
#3
(Oct-16-2020, 07:08 PM)Gribouillis Wrote: As a workaround, I suggest to use Queue.get() with a timeout, say half a second in the sentinel thread instead of a blocking Queue.get() and check if the worker process is still running when the timeout occurs. This gives the sentinel thread an option to exit instead of waiting for queue events when the worker thread is already dead.

I guess this is a last resort option. There still would data remain in the multiprocessing queue. My instinct tells me that somehow interrupt handlers/ asynchronous event handlers should do the trick somehow.
Reply


Messages In This Thread
RE: Terminating Subprocesses and Threads while they're calculating - by lvlanson - Oct-16-2020, 09:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Subprocesses not opening File Select Dialog teut 2 2,575 Feb-22-2021, 08:07 PM
Last Post: teut
Question Terminating threads Gilush 1 2,042 Jun-09-2020, 09:57 AM
Last Post: Gribouillis
  Using Terminating Signal to Terminate Long Threads crcali 1 2,730 Apr-06-2018, 01:26 AM
Last Post: woooee

Forum Jump:

User Panel Messages

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