Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 990 Bytes

File metadata and controls

14 lines (10 loc) · 990 Bytes

Realtime write lock

This is a concurrent, realtime data structure. The write locking is always nonblocking, while read locking may block. It is useful for communicating data from a realtime thread (for example the audio thread) to a non realtime thread (for example the GUI thread). The Data should always be replaced completely, not updated incrementally.

If the writer thread is the non realtime thread and reading should be nonblocking take a look at my other library simple-left-right. The implementation is similar, but the roles are reversed.

Hosted on tangled, codeberg and github. Open a PR or issue on any platform you like.

std::mem::forget

The library tries to detect if a Read/Write guard is forgotten and panics. Without this detection this could lead to UB.