Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce BoltsFutureTask class to avoid leaking bolts.Task into ReactHost API #37744

Closed
wants to merge 1 commit into from

Conversation

mdvacca
Copy link
Contributor

@mdvacca mdvacca commented Jun 6, 2023

Summary:
This diff introduces the new generic class BoltsFutureTask<> that will be used by ReactHost to expose async task in its API.
The goal of BoltsFutureTask is to avoid leadking the bolts.Task dependency into the ReactHost API.

Public methods of this class follow the spec defined in the Future interface, see: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html. I didn't add javadocs to avoid duplicated documentation with Future and also
becuase this is private class.

Task Cancellation follows the patters defined in bolts documentation: https://github.com/BoltsFramework/Bolts-Android#cancelling-tasks

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D46170466

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Jun 6, 2023
@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

analysis-bot commented Jun 6, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,744,467 -1
android hermes armeabi-v7a 8,056,627 -4
android hermes x86 9,235,568 -1
android hermes x86_64 9,086,367 -4
android jsc arm64-v8a 9,307,262 -5
android jsc armeabi-v7a 8,496,807 -3
android jsc x86 9,369,284 -2
android jsc x86_64 9,624,202 -5

Base commit: 396cdac
Branch: main

…tHost API (facebook#37744)

Summary:
Pull Request resolved: facebook#37744

This diff introduces the new generic class BoltsFutureTask<> that will be used by ReactHost to expose async task in its API.
The goal of BoltsFutureTask is to avoid leadking the bolts.Task dependency into the ReactHost API.

Public methods of this class follow the spec defined in the Future interface, see: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html. I didn't add javadocs to avoid duplicated documentation with Future and also
becuase this is private class.

Task Cancellation follows the patters defined in bolts documentation: https://github.com/BoltsFramework/Bolts-Android#cancelling-tasks

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D46170466

fbshipit-source-id: 010132660a45618347a5b218ff9947e6df4db6c9
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jun 7, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in fdfa012.

adamaveray added a commit to adamaveray/react-native that referenced this pull request Jun 8, 2023
* main: (1824 commits)
  Convert FallbackJSBundleLoaderTest to Kotlin (facebook#37750)
  Migrate JSPackagerClientTest to Kotlin (facebook#37747)
  (refactor): kotlin-ify `ShareModuleTest.java` (facebook#37746)
  Upgrade `@react-native/codegen-typescript-test`'s Jest dependency to Jest 29 (facebook#37745)
  Move flow-typed definitions to repo root (facebook#37636)
  Convert InterpolatorTypeTest to Kotlin (facebook#37724)
  Update documentation of ReactHost.reload method (facebook#37691)
  Reduce visibility of ReactHost.destroy() method (facebook#37693)
  Reduce visibility in React Context (facebook#37695)
  Remove InstanceHandleHelper as unused (facebook#37740)
  Convert CompositeReactPackageTest to Kotlin (facebook#37734)
  Add license header to SetSpanOperation.java
  Convert FakeEventDispatcher to kotlin (facebook#37739)
  Convert FakeRCTEventEmitter to Kotlin (facebook#37733)
  Convert InteropModuleRegistryTest to Kotlin (facebook#37735)
  Bump `autorebase.yml` to `v1.8` (facebook#37584)
  Convert StackTraceHelperTest to Kotlin (facebook#37741)
  Convert BlobModuleTest class to Kotlin (facebook#37719)
  Update prettier to v2.8.8 (facebook#37738)
  Introduce BoltsFutureTask class to avoid leaking bolts.Task into ReactHost API (facebook#37744)
  ...

# Conflicts:
#	BUCK
#	packages/react-native/React/Views/UIResponder+FirstResponder.h
#	packages/react-native/React/Views/UIResponder+FirstResponder.m
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