Skip to content

Commit

Permalink
Update the library-wide docs of conc with usage information.
Browse files Browse the repository at this point in the history
  • Loading branch information
ticki committed Jul 29, 2017
1 parent a558832 commit f5ee6a8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion conc/src/lib.rs
Expand Up @@ -17,11 +17,22 @@
//!
//! ## Usage
//!
//! While the low-level API is available, it is generally sufficient to use the `conc::Option`
//! While the low-level API is available, it is generally sufficient to use the `conc::Atomic`
//! abstraction. This acts much like familiar Rust APIs. It allows the programmer to concurrently
//! access a value through references, as well as update it, and more. Refer to the respective docs
//! for more information.
//!
//! If you are interested in implementing your own structures with `conc`, you must learn how to
//! use `Guard` and `add_garbage`. In short,
//!
//! - `conc::add_garbage()` adds a destructor with a pointer, which will be run eventually, when no
//! one is reading the data anymore. In other words, it acts as a concurrent counterpart to
//! `Drop::drop()`.
//! - `Guard` "protects" a pointer from being destroyed. That is, it delays destruction (which is
//! planned by `conc::add_garbage()`) until the guard is gone.
//!
//! See their respective API docs for details on usage and behavior.
//!
//! ## Why not crossbeam/epochs?
//!
//! Epochs and classical hazard pointers are generally faster than this crate, but it doesn't
Expand Down

0 comments on commit f5ee6a8

Please sign in to comment.