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: add countdown latch example to Semaphore #6105

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Oct 24, 2023

  1. docs: add countdown latch example to Semaphore

    ## Motivation
    
    Some users have requested that `tokio::sync` add a countdown latch
    synchronization primitive. This can be implemented using the existing
    `Semaphore` API, so rather than adding a countdown latch type, we should
    add documentation examples showing how the `Semaphore` can be used as a
    countdown latch.
    
    ## Solution
    
    This branch adds an example to the `tokio::sync::Semaphore` docs
    demonstrating its usage as a countdown latch. This example was extracted
    from #6087 (comment).
    
    Closes #6087
    hawkw committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    d801664 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2023

  1. Update semaphore.rs

    Co-authored-by: Alice Ryhl <aliceryhl@google.com>
    hawkw and Darksonn committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    f7a626f View commit details
    Browse the repository at this point in the history
  2. Update semaphore.rs

    Co-authored-by: Alice Ryhl <aliceryhl@google.com>
    hawkw and Darksonn committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    67b171a View commit details
    Browse the repository at this point in the history
  3. Update semaphore.rs

    Co-authored-by: Alice Ryhl <aliceryhl@google.com>
    hawkw and Darksonn committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    970d4b7 View commit details
    Browse the repository at this point in the history
  4. Update semaphore.rs

    Co-authored-by: Alice Ryhl <aliceryhl@google.com>
    hawkw and Darksonn committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    17984a5 View commit details
    Browse the repository at this point in the history