import Queue as queue
prio_queue = queue.PriorityQueue()
prio_queue.put((1, "Hello Brother"))
prio_queue.put((3, 'Nothing at all'))
prio_queue.put((2, 'Hello Teacher'))
while not prio_queue.empty():
item = prio_queue.get()
print ('%s %s' % item)
我有这三个任务并使用python队列库运行它们,只是为了删除最低优先级的任务,即3