Expand description
Wait-free single-producer single-consumer (SPSC) triple buffer to share data between two threads.
§Example
use waitfree_sync::triple_buffer;
let (mut wr, mut rd) = triple_buffer::triple_buffer();
wr.write(42);
assert_eq!(wr.try_read(), Some(42));
assert_eq!(rd.try_read(), Some(42));Structs§
- Reader
- The reading side of the triple_buffer.
- Writer
- The writing side of the triple_buffer.
Functions§
- triple_
buffer - Create a new wait-free riple buffer.