Skip to content

Fix dispatcher callback ownership and shutdown races - #58995

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

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.

This branch has not been deployed

No deployments
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. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant