-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters