ref_kman/
lib.rs

1//! # Ref is a Reference that is shared with multiples threads
2//!
3//! Equivalent `Arc<Mutex<T>>`
4//!
5//! `Arc<Mutex<T>>` is safer for things that need to be safe
6//!
7//! This will only be locked when is modified!
8//!
9//! This is good because you all ways can see the value.
10//!
11//! Is posibile to add some unexpected behaiviour!
12//!
13//! Is not very tested but for now is works!
14//!
15//! Use cases, when you want to make a game or a application,
16//! the application has some buttons or objects that can be modificated from other thread,
17//! but you always can see the value, for example for a renderer will not block the modifications from happening when is rendering,
18//! but this means that the state will not be the most up to date.
19//!
20//! ### Attention is not really tested, you should use `Arc<Mutex<T>>` insted!
21//!
22//! If you know what you doing you can use this!
23//!
24//! Not warrenty if what you make, will not break!
25//!
26//! But open a issue on github if you find a bug/problem
27mod r#ref;
28mod ref_inner;
29mod ref_mut;
30
31pub use r#ref::Ref;