Module cycler::rw_lock_cycler[][src]

The RwLockCycler uses parking_lot::RwLock to keep track of reading and writing to each block without using unsafe code. This is the first implementation but may not be the fastest as locks are required for each switch. Due to the way the data structure is designed there is always an available slot so all lock obtainment are use the try variant.

Structs

RwLockCyclerReader

The reader for an RwLockCycler

RwLockCyclerWriter

The writer to an RwLockCycler

Functions

build_multiple_reader

Creates a multi reader RwLockCycler, the amount of readers being initial_values.len() - 2.

build_single_reader

Creates a single reader RwLockCycler using values as the initial values for the slots.