Skip to content

Fix dispatcher callback ownership and shutdown races - #58995

Closed
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D124671180
Closed

Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D124671180

Conversation

@Abbondanzo

Copy link
Copy Markdown
Contributor

Summary:
Dispatch tasks through uniquely owned callable payloads so queue bookkeeping never copies or destroys populated captures while holding its mutex. Cancel queued work outside the queue lock, distinguish worker-thread shutdown requests from external-owner joining, and wake timed waits when the queue head changes.

Add focused dispatcher admission, cancellation, callable-copy, reentrant destruction and joining regressions. Inspector ownership and tester readiness are separate dependent increments, not behavior introduced here.

Changelog:
[General][Fixed] - Fix native dispatcher callback ownership and shutdown synchronization

Differential Revision: D124671180

Summary:
Dispatch tasks through uniquely owned callable payloads so queue bookkeeping never copies or destroys populated captures while holding its mutex. Cancel queued work outside the queue lock, distinguish worker-thread shutdown requests from external-owner joining, and wake timed waits when the queue head changes.

Add focused dispatcher admission, cancellation, callable-copy, reentrant destruction and joining regressions. Inspector ownership and tester readiness are separate dependent increments, not behavior introduced here.

Changelog:
[General][Fixed] - Fix native dispatcher callback ownership and shutdown synchronization

Differential Revision: D124671180
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 12, 2026
@meta-codesync

meta-codesync Bot commented Oct 12, 2026

Copy link
Copy Markdown

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D124671180.

@meta-codesync meta-codesync Bot closed this in 03355ef Oct 13, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Oct 13, 2026
@meta-codesync

meta-codesync Bot commented Oct 13, 2026

Copy link
Copy Markdown

This pull request has been merged in 03355ef.

@Abbondanzo
Abbondanzo deleted the export-D124671180 branch October 14, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant