[scheduler] Deadline object -> shouldYield - #14025
Conversation
Instead of using a requestIdleCallback-style deadline object, expose a method Scheduler.shouldYield that returns true if there's a higher priority event in the queue.
|
React: size: -1.4%, gzip: -0.6% ReactDOM: size: -0.1%, gzip: -0.0% Details of bundled changes.Comparing: 21a79a1...55da990 react
react-dom
react-test-renderer
react-reconciler
react-art
react-native-renderer
scheduler
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
It's early and I'm probably being stupid, but shouldn't this be elapsedTimeInMs < scheduledCallbackTimeout ?
Edit Never mind. This is just saying that we should never yield if work has already timed out.
There was a problem hiding this comment.
It's not initially obvious to me that dl.didTimeout is semantically equivalent to shouldYieldToRenderer() but I trust you here.
There was a problem hiding this comment.
Uh, why ! >= rather than <?
There was a problem hiding this comment.
Planned to change it once I proved it worked, then forgot :D
There was a problem hiding this comment.
"We yielded at least as many"?
* [scheduler] Deadline object -> shouldYield Instead of using a requestIdleCallback-style deadline object, expose a method Scheduler.shouldYield that returns true if there's a higher priority event in the queue. * Nits
* [scheduler] Deadline object -> shouldYield Instead of using a requestIdleCallback-style deadline object, expose a method Scheduler.shouldYield that returns true if there's a higher priority event in the queue. * Nits
* [scheduler] Deadline object -> shouldYield Instead of using a requestIdleCallback-style deadline object, expose a method Scheduler.shouldYield that returns true if there's a higher priority event in the queue. * Nits
Instead of using a requestIdleCallback-style deadline object, expose a method Scheduler.shouldYield that returns true if there's a higher priority event in the queue.