Skip to content

Conversation

@sammy-SC
Copy link
Contributor

Summary:
changelog: [internal]

as a general rule of thumb, do not call outside of your class when holding a mutex. It is easy to cause a deadlock because the outside code may end up trying to acquire the mutex down the stack, leading to deadlock.

Here, it happens because startRenderCallbackIfNeeded may end up calling onRender and in onRender, we try to acquire the mutex again

Reviewed By: javache

Differential Revision: D75675465

Summary:
changelog: [internal]

as a general rule of thumb, do not call outside of your class when holding a mutex. It is easy to cause a deadlock because the outside code may end up trying to acquire the mutex down the stack, leading to deadlock.

Here, it happens because `startRenderCallbackIfNeeded` may end up calling onRender and in onRender, we try to acquire the mutex again

Reviewed By: javache

Differential Revision: D75675465
@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 May 30, 2025
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3fb965d.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 30, 2025
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @sammy-SC in 3fb965d

When will my fix make it into a release? | How to file a pick request?

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