Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Use push/pop or append/take-the-first #45
https://www.w3.org/TR/requestidlecallback/#dfn-invoke-idle-callbacks-algorithm says "Pop callback from document's Window object's list of runnable idle callbacks.", but other uses of that list say "Append all entries from doclist into runlist preserving order." or "Append callback to window's list of idle request callbacks".
It's not clear whether "pop" means to take the element from the beginning of the list or the end. Using push/pop would make it clear that this is a stack, while append/take-the-first would make it clear that it's a queue.
The intended semantics are that of a queue. I'm don't necessarily think push/pop implies stack semantics (e.g., std::queue uses push/pop), but agree we this could be clearer. How about "pop the first element" (to make it clear the element should be removed)?