Implement prioritized queues.