[Webkit-unassigned] [Bug 164193] Implement requestIdleCallback

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 14 14:13:53 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=164193

--- Comment #13 from Michael Catanzaro <mcatanzaro at gnome.org> ---
> Only problem could be if a secondary thread is doing something that will imminently cause a task to post to the main thread.

Actually, it's also possible that higher-priority timeouts are already scheduled on the main thread that might be about to post. That could be detected automatically by implementing a rule that idles do not dispatch if a timeout is scheduled within the next n milliseconds. But if we set n too high then we could accidentally denial of service every idle callback, so not sure it's a good idea, probably again not part of the minimal viable solution. I'm inclined to ignore all of this and schedule the idle callbacks whenever there is no other non-idle priority source to be dispatched on the current run loop iteration. Simple is often best; if it doesn't work well in practice, then we can deal with added complexity later on.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230314/bb7acda6/attachment.htm>


More information about the webkit-unassigned mailing list