On 6/19/2011 11:39 AM, Laurent Claessens wrote:

In the same time I've a thread that read the list and perform the
operations:

def run():
while task_list :
task = task_list[0]
task_list.remove(task)
task.start()

Popping task off the end of the list is more efficient:

while task_list:
  task_list.pop().start()

or if the list is static

for task in task_list:
  task.start()


--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to