Build a Sequential Async Callback Queue Processor (Part 2)

Extend the Part 1 async callback queue engine to support additional features such as pausing, resuming, and prioritizing tasks in the queue. Each task is an async callback, and the engine must process them one at a time in the correct order. This version introduces lifecycle controls and is a common pattern used in job schedulers, task runners, and browser task queues like those used in rendering pipelines.

Examples
Input: []
Output:
Hints

Build a Sequential Async Callback Queue Processor (Part 2)

Extend the Part 1 async callback queue engine to support additional features such as pausing, resuming, and prioritizing tasks in the queue. Each task is an async callback, and the engine must process them one at a time in the correct order. This version introduces lifecycle controls and is a common pattern used in job schedulers, task runners, and browser task queues like those used in rendering pipelines.