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

docs: queueing a series of updates #1095

Merged
merged 20 commits into from
Feb 12, 2025

Conversation

dgodinez-dh
Copy link
Contributor

set_friend_count(lambda fc: fc * 2)
```

If you prefer more verbose code, another common convention is to repeat the full state variable name, like `set_enabled(lambda enabled: not enabled)`, or to use a prefix like `set_enabled(lambda prev_enabled: not prev_enabled)`.
Copy link
Member

Choose a reason for hiding this comment

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

We should mention multi-threaded cases somewhere. Have a note that in multi-threaded cases they aren't batched by default and you need to use the use_render_queue to ensure they do get batched if you're going to do work from a background thread.
Got a note about it in the use_render_queue docs: https://salmon.deephaven.io/core/ui/docs/hooks/use_render_queue/#batch-updates
This is different than React because JS is single threaded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a note and linked to the use_render_queue docs.

@dgodinez-dh dgodinez-dh requested a review from mofojed January 27, 2025 19:40
mofojed
mofojed previously approved these changes Jan 27, 2025
Copy link

github-actions bot commented Feb 7, 2025

ui docs preview (Available for 14 days)

Copy link

ui docs preview (Available for 14 days)

Copy link

ui docs preview (Available for 14 days)

@dgodinez-dh dgodinez-dh merged commit d5dee4d into deephaven:main Feb 12, 2025
17 checks passed
@dgodinez-dh dgodinez-dh deleted the dag_QueueUpdates branch February 12, 2025 17:00
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.

3 participants