Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Oct 18, 2022
1 parent 6adfacd commit 2813790
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
This library provides wrapper types that permit sending non Send types to other
threads and use runtime checks to ensure safety.

It provides the `Fragile<T>`, `Sticky<T>` and `SemiSticky<T>` types which are
similar in nature but have different behaviors with regards to how destructors
are executed. The `Fragile<T>` will panic if the destructor is called in another
thread, `Sticky<T>` will temporarily leak the object until the thread shuts down.
`SemiSticky<T>` is a compromise of the two. It behaves like `Sticky<T>` but it
avoids the use of thread local storage if the type does not need `Drop`.

## Example

```rust
Expand Down
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
//!
//! The types provided by this crate wrap a value and provide a `Send` bound. None of
//! the types permit access to the enclosed value unless the thread that wrapped the
//! value is attempting to access it. In the 1.2 release family only [`Fragile`] is
//! sound to use.
//! value is attempting to access it.
//!
//! A [`Fragile`] will actually send the `T` from thread to thread but will only
//! permit the original thread to invoke the destructor. If the value gets dropped
//! in a different thread, the destructor will panic.
//!
//! **Warning:** The 1.2 release family of fragile have broken `Sticky` and `SemiSticky`
//! types. Because the behavior requires an API change it can only be corrected by
//! a major semver update.
//!
//! # Example
//!
//! ```
Expand Down

0 comments on commit 2813790

Please sign in to comment.