Skip to content

Priority Queue Option #68

@sebmarkbage

Description

@sebmarkbage

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions