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 shared mutable state documentation #1759
Add shared mutable state documentation #1759
Commits on Feb 22, 2023
-
Added mutable state documentation.
The documentation for sharing a mutable state did not provide examples. Wrote explanation of the steps required to share mutable states between routes. Provided an example in code. This was inspired from discussion tokio-rs#629 tokio-rs#629
Configuration menu - View commit details
-
Copy full SHA for aef579b - Browse repository at this point
Copy the full SHA aef579bView commit details -
Updated mutex info in mutable state documentation
The cost of using an async mutex was not mentioned. Rather than defaulting to async, the documentation now gives the std Mutex in the example and links to the discussion from tokio.
Configuration menu - View commit details
-
Copy full SHA for 39253ec - Browse repository at this point
Copy the full SHA 39253ecView commit details -
Remove example in documentation
Example was opinionated and specific. Also, changed written description to be more general.
Configuration menu - View commit details
-
Copy full SHA for 7cc2ab6 - Browse repository at this point
Copy the full SHA 7cc2ab6View commit details -
Provides more consistent style across code base
Configuration menu - View commit details
-
Copy full SHA for c7e37b7 - Browse repository at this point
Copy the full SHA c7e37b7View commit details -
Incorporated changes from with_state.md with Vagelis's changes.
Vagelis had a similar pull request. Changes were merged. Added a note about deadlocks. A detailed discussion may not be appropriate. However, a note that makes people aware of the potential consequences could help reduce pitfalls of share mutable state.
Configuration menu - View commit details
-
Copy full SHA for 7ebccbb - Browse repository at this point
Copy the full SHA 7ebccbbView commit details -
Configuration menu - View commit details
-
Copy full SHA for a83c5e6 - Browse repository at this point
Copy the full SHA a83c5e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 856ac49 - Browse repository at this point
Copy the full SHA 856ac49View commit details -
Update axum/src/extract/state.rs
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Configuration menu - View commit details
-
Copy full SHA for c20ed6b - Browse repository at this point
Copy the full SHA c20ed6bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d31c82 - Browse repository at this point
Copy the full SHA 8d31c82View commit details
Commits on Feb 23, 2023
-
Update axum/src/extract/state.rs
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Configuration menu - View commit details
-
Copy full SHA for 533850d - Browse repository at this point
Copy the full SHA 533850dView commit details