Skip to content

Remove getIsSynchronous method from RuntimeScheduler#43441

Closed
rubennorte wants to merge 1 commit into
facebook:mainfrom
rubennorte:export-D54804805
Closed

Remove getIsSynchronous method from RuntimeScheduler#43441
rubennorte wants to merge 1 commit into
facebook:mainfrom
rubennorte:export-D54804805

Conversation

@rubennorte

Copy link
Copy Markdown
Contributor

Summary:
RuntimeScheduler::getIsSynchronous is currently used to check if the current task is being executed on the main thread, to avoid using the background executor. This was part of a test to dispatch events synchronously in an app using background executor.

We're not running that test anymore and this method doesn't make a lot of sense in the first place (it's not checking if the current task is running on the main thread, only if the caller of the task scheduled it synchronously from whatever thread they called from), so we can remove the method.

If this is necessary in the future we should create a method that actually does something useful (like isCurrentTaskOnMainThread()).

Changelog: [internal]

I consider this change not to be a breaking change because runtime scheduler wasn't an official public API, and what we want to make public doesn't include this method.

Differential Revision: D54804805

@facebook-github-bot facebook-github-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 Mar 12, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D54804805

Summary:

`RuntimeScheduler::getIsSynchronous` is currently used to check if the current task is being executed on the main thread, to avoid using the background executor. This was part of a test to dispatch events synchronously in an app using background executor.

We're not running that test anymore and this method doesn't make a lot of sense in the first place (it's not checking if the current task is running on the main thread, only if the caller of the task scheduled it synchronously from whatever thread they called from), so we can remove the method.

If this is necessary in the future we should create a method that actually does something useful (like `isCurrentTaskOnMainThread()`).

Changelog: [internal]

I consider this change not to be a breaking change because runtime scheduler wasn't an official public API, and what we want to make public doesn't include this method.

Differential Revision: D54804805
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D54804805

@analysis-bot

Copy link
Copy Markdown
Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 18,073,876 +17
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,440,617 +19
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 4f10f30
Branch: main

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 13, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 6c50418.

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 Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants