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 shared mutable state documentation #1759

Merged
merged 10 commits into from Feb 23, 2023

Commits on Feb 22, 2023

  1. 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
    ThanePatrol authored and Vagelis-Prokopiou committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    aef579b View commit details
    Browse the repository at this point in the history
  2. 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.
    ThanePatrol authored and Vagelis-Prokopiou committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    39253ec View commit details
    Browse the repository at this point in the history
  3. Remove example in documentation

    Example was opinionated and specific.
    Also, changed written description to be more general.
    ThanePatrol authored and Vagelis-Prokopiou committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    7cc2ab6 View commit details
    Browse the repository at this point in the history
  4. Changed HTML link to markdown

    Provides more consistent style across code base
    ThanePatrol authored and Vagelis-Prokopiou committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    c7e37b7 View commit details
    Browse the repository at this point in the history
  5. 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.
    ThanePatrol authored and Vagelis-Prokopiou committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    7ebccbb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a83c5e6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    856ac49 View commit details
    Browse the repository at this point in the history
  8. Update axum/src/extract/state.rs

    Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
    Vagelis-Prokopiou and jplatte committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    c20ed6b View commit details
    Browse the repository at this point in the history
  9. nit picky changes

    davidpdrsn committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    8d31c82 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2023

  1. Update axum/src/extract/state.rs

    Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
    Vagelis-Prokopiou and jplatte committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    533850d View commit details
    Browse the repository at this point in the history