-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Make AnimationBackend methods thread-safe #55205
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
@bartlomiejbloniarz has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90505528. |
Job Summary for GradleTest All :: run_fantom_tests
|
…imationBackend to its own DisplayLink on iOS" (#55103) Summary: Pull Request resolved: #55103 This diff decouples AnimationBackend from Animated. Now the backend is intialized in the Scheduler, from where it's passed to UIManager. Animation frontends (such as Animated) can then obtain a reference to the backend, and use it to schedule animation frame updates. # Changelog [General] [Changed] - Moved AnimationBackend initiailzation to `Scheduler` [General] [Added] - `AnimationChoreographer` interface with an implementation for fantom tests Differential Revision: D89663251 Reviewed By: zeyap
Summary: Pull Request resolved: #55124 On Android AnimationBackend has now its own instance of the Choreographer that it interacts with. # Changelog [General] [Removed] - `UIManagerNativeAnimatedDelegateBackendImpl` [General] [Added] - `AnimationBackendChoreographer`, `AndroidAnimationChoregrapher` Differential Revision: D90327370
Summary: Pull Request resolved: #55123 On iOS and macOS AnimationBackend has now its own instance of the DisplayLink that it interacts with (through `RCTAnimationChoreographer`). # Changelog [General] [Added] - `RCTAnimationChoreographer` to `RCTScheduler` Differential Revision: D90327371
Summary: Pull Request resolved: #55205 In `AnimationBackend` the start and stop methods can be called from both the JS and UI thread (Animated does that in some cases). To handle that both of these methods are guarded with a mutex. Also the list of callbacks is also guarded with the mutex. # Changelog [General] [Added] - `std::mutex` to `AnimationBackend` to protect `start`, `stop` and `callbacks`. Differential Revision: D90505528
bartlomiejbloniarz
pushed a commit
that referenced
this pull request
Jan 16, 2026
Summary: Pull Request resolved: #55205 In `AnimationBackend` the start and stop methods can be called from both the JS and UI thread (Animated does that in some cases). To handle that both of these methods are guarded with a mutex. Also the list of callbacks is also guarded with the mutex. # Changelog [General] [Added] - `std::mutex` to `AnimationBackend` to protect `start`, `stop` and `callbacks`. Differential Revision: D90505528
b55a6e9 to
520335d
Compare
Collaborator
|
This pull request was successfully merged by Bartlomiej Bloniarz in 520335d When will my fix make it into a release? | How to file a pick request? |
bartlomiejbloniarz
pushed a commit
that referenced
this pull request
Jan 20, 2026
Summary: Pull Request resolved: #55205 In `AnimationBackend` the start and stop methods can be called from both the JS and UI thread (Animated does that in some cases). To handle that both of these methods are guarded with a mutex. Also the list of callbacks is also guarded with the mutex. # Changelog [General] [Added] - `std::mutex` to `AnimationBackend` to protect `start`, `stop` and `callbacks`. Differential Revision: D90505528
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.
meta-exported
p: Facebook
Partner: Facebook
p: Software Mansion
Partner: Software Mansion
Partner
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
In
AnimationBackendthe start and stop methods can be called from both the JS and UI thread (Animated does that in some cases). To handle that both of these methods are guarded with a mutex. Also the list of callbacks is also guarded with the mutex.Changelog
[General] [Added] -
std::mutextoAnimationBackendto protectstart,stopandcallbacks.Differential Revision: D90505528