Ejemplo n.º 1
0
	def runloop(self):
		while self.current <= self.end:
			remainLimit = self.limit - threading.activeCount()
			if remainLimit > 0:
				for x in xrange(1, remainLimit):
					uri = uriTemplate % (self.current,)
					self.current += 1
					worker = Worker(uri=uri)
					worker.daemon = True
					worker.start()
					# worker.join()
			
			time.sleep(2)