Skip to content

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 enabled auto-merge June 25, 2024 13:33
@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
@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