priority_queue: without thread