Exemplo n.º 1
0
 def __fetch__(self):
     "get the next item from the sequence and queue it up"
     item = next(self.sequence)
     key = self.func(item)
     queue = self.queues.setdefault(key, FetchingQueue(self.__fetch__))
     queue.enqueue(item)
Exemplo n.º 2
0
	def __fetch__(self):
		"get the next item from the sequence and queue it up"
		item = next(self.sequence)
		key = self.func(item)
		queue = self.queues.setdefault(key, FetchingQueue(self.__fetch__))
		queue.enqueue(item)