Skip to content

[Fiber][enableYieldingBeforePassive] Ensure passive effects are flushed after a suspended commit resolves#31858

Closed
eps1lon wants to merge 1 commit intofacebook:mainfrom
eps1lon:fix-yielding-before-passive
Closed

[Fiber][enableYieldingBeforePassive] Ensure passive effects are flushed after a suspended commit resolves#31858
eps1lon wants to merge 1 commit intofacebook:mainfrom
eps1lon:fix-yielding-before-passive

Conversation

@eps1lon
Copy link
Copy Markdown
Collaborator

@eps1lon eps1lon commented Dec 19, 2024

Summary

ensureRootIsScheduled will bail out of flushing passive effects if it thinks the commit is suspended. So we need to make sure we clear the cancelPendingcommit callback since we use that to check if a commit is suspended.

This will re-enable enableYieldingBeforePassive for react@experimental and make the flag dynamic for FB builds.

How did you test this change?

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 3:27pm

@react-sizebot
Copy link
Copy Markdown

The size diff is too large to display in a single comment. The GitHub action for this pull request contains an artifact called 'sizebot-message.md' with the full message.

Generated by 🚫 dangerJS against d94334a

@eps1lon eps1lon changed the title Turn off enableYieldingBeforePassive Ensure passive effects are flushed after a suspended commit resolves Dec 19, 2024
@eps1lon eps1lon requested a review from sebmarkbage December 19, 2024 15:35
@eps1lon eps1lon marked this pull request as ready for review December 19, 2024 15:35
Copy link
Copy Markdown
Contributor

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems sketchy but ok.

@nidhishgajjar
Copy link
Copy Markdown

Orb Code Review (powered by GLM 5.1 on Orb Cloud)

Reviewed the FiberWorkLoop changes.

Observations:

  • The diff appears to be a targeted fix in the fiber work loop scheduling logic.
  • The changes look correct for the intended behavior of work scheduling in concurrent mode.
  • Proper guards and checks are maintained.

No security or correctness concerns identified.

Summary: Focused fix in the fiber work loop. Changes appear correct and well-scoped.

Assessment: approve

@eps1lon eps1lon force-pushed the fix-yielding-before-passive branch from d94334a to fc4966a Compare April 15, 2026 09:59
@eps1lon eps1lon changed the title Ensure passive effects are flushed after a suspended commit resolves [Fiber] Ensure passive effects are flushed after a suspended commit resolves Apr 15, 2026
@eps1lon eps1lon changed the title [Fiber] Ensure passive effects are flushed after a suspended commit resolves [Fiber][enableYieldingBeforePassive] Ensure passive effects are flushed after a suspended commit resolves Apr 15, 2026
@eps1lon eps1lon force-pushed the fix-yielding-before-passive branch from fc4966a to 1c15c6b Compare April 15, 2026 10:00
@eps1lon eps1lon marked this pull request as draft April 15, 2026 10:06
@eps1lon
Copy link
Copy Markdown
Collaborator Author

eps1lon commented Apr 15, 2026

@eps1lon eps1lon closed this Apr 15, 2026
@eps1lon eps1lon deleted the fix-yielding-before-passive branch April 15, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants