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

Add remark about reading SharedValue from the js thread #6160

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

j-piasecki
Copy link
Member

Summary

Reading from a shared value on the js thread may block the JS thread until the UI runtime finishes whatever it's doing. This isn't really communicated clearly and adding it to the docs seems like the best option as we don't want to show warnings.

Test plan

I asked ChatGPT to point out problems (it did).

Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡

@j-piasecki j-piasecki added this pull request to the merge queue Jun 25, 2024
Merged via the queue into main with commit 7aea7e5 Jun 25, 2024
6 checks passed
@j-piasecki j-piasecki deleted the @jpiasecki/docs-shared-value-blocking branch June 25, 2024 13:51
@joe-sam
Copy link

joe-sam commented Jun 29, 2024

This is confusing 🫡 and possibly requires some investigation.
Shouldn't all Read operations on a shared objects be non-blocking unless there are one or more multiple write operation (object locks) on the object in question on the UI thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants