From 7bf06e4fa52e5b70f5ddcd4bdb25eb2859b35d36 Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 17 Dec 2024 21:07:49 +0800 Subject: [PATCH] more docs Signed-off-by: tison --- README.md | 1 + mea/src/condvar/mod.rs | 4 ++-- mea/src/lib.rs | 12 +++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3bb7155..70b3b1f 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Mea (Make Easy Async) is a runtime-agnostic library providing essential synchron ## Features * [**Barrier**](https://docs.rs/mea/*/mea/barrier/struct.Barrier.html): A synchronization primitive that enables tasks to wait until all participants arrive. +* [**Condvar**](https://docs.rs/mea/*/mea/condvar/struct.Condvar.html): A condition variable that allows tasks to wait for a notification. * [**Latch**](https://docs.rs/mea/*/mea/latch/struct.Latch.html): A synchronization primitive that allows one or more tasks to wait until a set of operations completes. * [**Mutex**](https://docs.rs/mea/*/mea/mutex/struct.Mutex.html): A mutual exclusion primitive for protecting shared data. * [**Semaphore**](https://docs.rs/mea/*/mea/semaphore/struct.Semaphore.html): A synchronization primitive that controls access to a shared resource. diff --git a/mea/src/condvar/mod.rs b/mea/src/condvar/mod.rs index c90efc7..eab2dd3 100644 --- a/mea/src/condvar/mod.rs +++ b/mea/src/condvar/mod.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! A Condition Variable. +//! A condition variable that allows tasks to wait for a notification. //! //! # Examples //! @@ -60,7 +60,7 @@ use crate::mutex::MutexGuard; #[cfg(test)] mod tests; -/// A Condition Variable. +/// A condition variable that allows tasks to wait for a notification. /// /// See the [module level documentation](self) for more. pub struct Condvar { diff --git a/mea/src/lib.rs b/mea/src/lib.rs index 95b2c01..20e7fc9 100644 --- a/mea/src/lib.rs +++ b/mea/src/lib.rs @@ -23,12 +23,13 @@ //! //! ## Features //! -//! * [`Barrier`] - A synchronization point where multiple tasks can wait until all participants +//! * [`Barrier`]: A synchronization point where multiple tasks can wait until all participants //! arrive -//! * [`Latch`] - A single-use barrier that allows one or more tasks to wait until a signal is given -//! * [`Mutex`] - A mutual exclusion primitive for protecting shared data -//! * [`Semaphore`] - A synchronization primitive that controls access to a shared resource -//! * [`WaitGroup`] - A synchronization primitive that allows waiting for multiple tasks to complete +//! * [`Condvar`]: A condition variable that allows tasks to wait for a notification. +//! * [`Latch`]: A single-use barrier that allows one or more tasks to wait until a signal is given +//! * [`Mutex`]: A mutual exclusion primitive for protecting shared data +//! * [`Semaphore`]: A synchronization primitive that controls access to a shared resource +//! * [`WaitGroup`]: A synchronization primitive that allows waiting for multiple tasks to complete //! //! ## Runtime Agnostic //! @@ -43,6 +44,7 @@ //! multiple threads. //! //! [`Barrier`]: barrier::Barrier +//! [`Condvar`]: condvar::Condvar //! [`Latch`]: latch::Latch //! [`Mutex`]: mutex::Mutex //! [`Semaphore`]: semaphore::Semaphore