Scheduling Tasks by Priority
Juggling work at different priorities using scheduler.postTask().
How to test:
- Click Schedule Batch (Mixed) to add tasks of different priorities to the queue.
- Observe the log: Tasks should execute in order of priority (Blocking > Visible > Background), regardless of the order they were added.
- Try clicking individual buttons to see how they behave.