#sync #thread

inert

Inert lets you use non-Sync values in a Sync way

7 releases

✓ Uses Rust 2018 edition

0.3.0 Mar 18, 2019
0.2.4 Mar 12, 2019
0.2.2 Feb 25, 2019
0.1.0 Feb 13, 2019

#115 in Concurrency

Download history 8/week @ 2019-02-08 20/week @ 2019-02-15 22/week @ 2019-02-22 24/week @ 2019-03-01 18/week @ 2019-03-08 38/week @ 2019-03-15 41/week @ 2019-03-22 2/week @ 2019-03-29 10/week @ 2019-04-05 3/week @ 2019-04-12 8/week @ 2019-04-19

57 downloads per month

Apache-2.0 OR MIT

27KB
692 lines

Inert

This is a mechanism to access non-Sync values in a Sync way.

How is this sound?

When the user creates a &Inert<T> value from a &T, they must swear on the holy baguette that they won't use the T directly until all the Inert wrappers go away, while the various implementations of the Neutralize trait make sure that the non-Sync behaviour of the T cannot be observed through the wrapper.

How can I help?

Improve documentation, test the crate, make use of it.


lib.rs:

Inert lets you access non-Sync data in Sync context, hiding from the user anything that may not be sound to use when the value is shared.

Dependencies

~773KB
~17K SLoC