Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/scheduler/src/forks/Scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,14 @@ const performWorkUntilDeadline = () => {
// remain true, and we'll continue the work loop.
let hasMoreWork = true;
try {
if (isPerformingWork) {
// A scheduled task triggered a host event (e.g. valid re-entry).
// If we process it now, we'll lose key context. Schedulers that
// support re-entry should verify that the queue is empty before
// processing.
// For now, we'll just yield.
return;
}
hasMoreWork = flushWork(currentTime);
} finally {
if (hasMoreWork) {
Expand Down