Filling a queue and managing multiprocessing in python
问题 I'm having this problem in python: I have a queue of URLs that I need to check from time to time if the queue is filled up, I need to process each item in the queue Each item in the queue must be processed by a single process (multiprocessing) So far I managed to achieve this "manually" like this: while 1: self.updateQueue() while not self.mainUrlQueue.empty(): domain = self.mainUrlQueue.get() # if we didn't launched any process yet, we need to do so if len(self.jobs) < maxprocess: self