Python Forum
Code issue with time remaining loop. Python3
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code issue with time remaining loop. Python3
#11
I don't see how it'd ever do what you expect, since you're spawning a new process every time you're calling "cleancycle", along with a new queue.

What if you only call cleancycle one time, when you want to start a process, so you don't have possibly dozens of extra processes running around? If you return the queue, then when you want to stop, you can put a value in the queue like you're trying to do now.
Reply
#12
was able to get it with starting it as a thread and then if it receives 0 it kills itself off
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Updating Code And Having Issue With Keys Xileron 8 1,084 May-25-2023, 11:14 PM
Last Post: DigiGod
  Python3 for loop over a dict ogautier 3 1,332 Feb-25-2022, 10:17 AM
Last Post: Larz60+
  NameError issue with daughter's newb code MrGonk 2 1,406 Sep-16-2021, 01:29 PM
Last Post: BashBedlam
  Calculator code issue using list kirt6405 4 2,202 Jun-11-2021, 10:13 PM
Last Post: topfox
  How to measure execution time of a multithread loop spacedog 2 2,835 Apr-24-2021, 07:52 AM
Last Post: spacedog
  Assistance with running a few lines of code at an EXACT time nethatar 5 3,165 Feb-24-2021, 10:43 PM
Last Post: nilamo
  Stumped by my own code (ratio & epoch-time calculation). MvGulik 2 2,088 Dec-30-2020, 12:04 AM
Last Post: MvGulik
  Code taking too much time to process ErPipex 11 4,818 Nov-16-2020, 09:42 AM
Last Post: DeaD_EyE
  What is the run time complexity of this code and please explain? samlee916 2 2,257 Nov-06-2020, 02:37 PM
Last Post: deanhystad
  The count variable is giving me a hard time in this code D4isyy 2 1,929 Aug-09-2020, 10:32 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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