Python Forum
a task Queue() that i don't need to finish
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a task Queue() that i don't need to finish
#1
i am looking at multiprocessing.Queue() and multiprocessing.JoinableQueue(). but i don't want to finish the the last remaining tasks of the queue. each task must wait to be started until some previous task has ended but the process putting tasks into the queue needs to block at the end only after the last task has started, not until it has ended. when the whole script exits, the last N tasks (separate processes) can still be running. the goal is to limit the number of processes running at the same time. but at the end, when there are no more remaining to be run, i can leave the last ones running in the background. the main task that inserts all the others must wait (do a join call) in case there are many that have not yet started. but once they have all been started, it can go ahead and exit. is there a way for this to be done in the Python Library?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

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