Skip to content

[Merged by Bors] - SystemState usage docs #3783

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

Conversation

alice-i-cecile
Copy link
Member

Objective

Solution

  • Clearly document how to use SystemState, and why they're useful as an end-user.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Jan 27, 2022
@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation and removed S-Needs-Triage This issue needs to be labelled labels Jan 27, 2022
@alice-i-cecile alice-i-cecile changed the title System state docs SystemState usage docs Jan 27, 2022
Copy link

@speakk speakk left a comment

Choose a reason for hiding this comment

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

Overall looks great, few typos and suggestions and after that I'll send approval!

@alice-i-cecile
Copy link
Member Author

@TheRawMeatball, the caching example is rather involved (relevant to discussion in #3774).

I think I can get it working with a resource scope, but this pattern is clearly suboptimal.

@TheRawMeatball
Copy link
Member

Hm, resource_scope is how I do the caching usually, but given the boilerplate associated I agree we could make it better. I'd use resource_scope for now, and we can make a better API for this later.

@alice-i-cecile alice-i-cecile marked this pull request as draft February 4, 2022 12:47
@alice-i-cecile alice-i-cecile marked this pull request as ready for review February 14, 2022 20:29
Copy link

@speakk speakk left a comment

Choose a reason for hiding this comment

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

This looks excellent and I will already Approve, but positing one question: Should there be a quick passage on why resource scope might be desirable in certain situations?

Maybe not necessary, just thought I would bring it up anyway.

@alice-i-cecile
Copy link
Member Author

Should there be a quick passage on why resource scope might be desirable in certain situations?

It's probably slightly faster in general, and can be clearer / less verbose. I don't think it's worth including without benchmarks that are outside of the scope of this PR.

Copy link
Contributor

@djeedai djeedai left a comment

Choose a reason for hiding this comment

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

That helped quite a lot, thanks for the docs @alice-i-cecile!

@alice-i-cecile
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Feb 15, 2022
# Objective

- `SystemStates` rock for dealing with exclusive world access, but are hard to figure out how to use.
- Fixes #3341.

## Solution

- Clearly document how to use `SystemState`, and why they're useful as an end-user.
@bors bors bot changed the title SystemState usage docs [Merged by Bors] - SystemState usage docs Feb 15, 2022
@bors bors bot closed this Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document SystemState's use as an important tool for working with World
4 participants