Skip to content

Remove enableMainQueueCoordinatorOnIOS, make coordinator always-on (#56935)#56935

Open
javache wants to merge 2 commits into
facebook:mainfrom
javache:export-D105984547
Open

Remove enableMainQueueCoordinatorOnIOS, make coordinator always-on (#56935)#56935
javache wants to merge 2 commits into
facebook:mainfrom
javache:export-D105984547

Conversation

@javache
Copy link
Copy Markdown
Member

@javache javache commented May 22, 2026

Summary:

The enableMainQueueCoordinatorOnIOS flag has finished rollout. Drop it from the feature-flag config, regenerate the per-language accessors, and inline the previously-gated paths:

  • RCTUtils.mm: RCTUnsafeExecuteOnMainQueueSync and the RCTUnsafeExecuteOnMainQueueOnceSync helper always use unsafeExecuteOnMainThreadSync on iOS (the TV fallback to dispatch_sync(main, ...) stays).
  • RuntimeExecutorSyncUIThreadUtils.mm: executeSynchronouslyOnSameThread_CAN_DEADLOCK switches between two paths based on the calling thread instead of the feature flag. Main-thread callers (production) take the coordinator path that pumps UI tasks while waiting for JS; off-main callers (e.g. RuntimeScheduler unit tests) take a simpler path that just waits for the runtime and runs runtimeWork synchronously on the calling thread. Trimmed the runtimeCaptureBlockDone plumbing that an old TODO already flagged as unnecessary.

Also drops the iOS override in the Wilde plugin, the now-dead rn_fling.enable_main_queue_coordinator_on_ios MobileConfig param, and the flagOff variant of the characterization test (the on-path test still pins the contract).

Changelog:
[iOS][Changed] - RCTUnsafeExecuteOnMainQueueSync and bridgeless sync runtime-thread calls now always use the coordinator implementation that pumps UI tasks while waiting for JS, eliminating a class of deadlocks. The previous opt-in flag has been removed.

Reviewed By: sammy-SC

Differential Revision: D105984547

@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 May 22, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 22, 2026

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

javache and others added 2 commits May 26, 2026 03:27
Summary:
The `enableVirtualViewDebugFeatures` feature flag was effectively dead — its only MobileConfig backing param (`rn_fling.fling_debug`) hadn't been updated in 365+ days, and the codemod-tracking diff D105936405 was already queued to remove the three native overrides. Rather than carry the FF + JS overlay surface forward, delete the whole stack: the FF, the overrides, the BUCK dep, the JS overlay components (`FlingItemOverlay`, `FlingDebugItemOverlay`, `FlingDebugOverlay`), the debug-log helpers in the native ScrollView/VirtualView implementations on both iOS and Android, and the now-orphaned references in `VirtualCollectionView`.

Net: 4 files deleted, the FF removed from the cross-language codegen, native debug logging dropped from 5 files (1 ObjC++, 4 Kotlin), and consumer code in `VirtualCollectionView` simplified.

Changelog:
[General][Removed] - Remove unused `enableVirtualViewDebugFeatures` feature flag and the associated `FlingItemOverlay` / `FlingDebugItemOverlay` debug surfaces.

Differential Revision: D105959433
…acebook#56935)

Summary:
Pull Request resolved: facebook#56935

The `enableMainQueueCoordinatorOnIOS` flag has finished rollout. Drop it from the feature-flag config, regenerate the per-language accessors, and inline the previously-gated paths:

- `RCTUtils.mm`: `RCTUnsafeExecuteOnMainQueueSync` and the `RCTUnsafeExecuteOnMainQueueOnceSync` helper always use `unsafeExecuteOnMainThreadSync` on iOS (the TV fallback to `dispatch_sync(main, ...)` stays).
- `RuntimeExecutorSyncUIThreadUtils.mm`: `executeSynchronouslyOnSameThread_CAN_DEADLOCK` switches between two paths based on the calling thread instead of the feature flag. Main-thread callers (production) take the coordinator path that pumps UI tasks while waiting for JS; off-main callers (e.g. RuntimeScheduler unit tests) take a simpler path that just waits for the runtime and runs `runtimeWork` synchronously on the calling thread. Trimmed the `runtimeCaptureBlockDone` plumbing that an old TODO already flagged as unnecessary.

Also drops the iOS override in the Wilde plugin, the now-dead `rn_fling.enable_main_queue_coordinator_on_ios` MobileConfig param, and the `flagOff` variant of the characterization test (the on-path test still pins the contract).

Changelog:
[iOS][Changed] - `RCTUnsafeExecuteOnMainQueueSync` and bridgeless sync runtime-thread calls now always use the coordinator implementation that pumps UI tasks while waiting for JS, eliminating a class of deadlocks. The previous opt-in flag has been removed.

Reviewed By: sammy-SC

Differential Revision: D105984547
@meta-codesync meta-codesync Bot changed the title Remove enableMainQueueCoordinatorOnIOS, make coordinator always-on Remove enableMainQueueCoordinatorOnIOS, make coordinator always-on (#56935) May 26, 2026
@javache javache force-pushed the export-D105984547 branch from 01b2c5b to 3e50ff5 Compare May 26, 2026 12:41
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. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant