-
Notifications
You must be signed in to change notification settings - Fork 14
Priority Queue Option #68
Description
We find ourselves often having multiple pieces of work at different priority levels. E.g. React implements a priority queue and a central requestIdleCallback. Then it picks the highest priority to work on at any given point.
The problem is that different frameworks don't share the same priority queue. So low priority work in one system can get prioritized over high priority work in another framework.
That sounds like a perfect reason for why a standardized priority queue is needed.
I propose adding another option to IdleRequestOptions called priority. This would hold a number. The user agent would then call the callbacks of the highest priority before the lowest priority, unless a timeout elapsed, in which case they take priority just like today.