This is a small library that implements a blockfree channel. Reading and writing are guaranteed to not block. Reading is guaranteed to give valid data, but not the most recently written data. As long as a reader or writer is alive, the data being read will not update. There is no guarantee that written data will ever be readable.
This was written to help visualize audio data in a thread-safe way. The rendering and data collection, whatever they may be, must happen on different threads, the audio thread must not block, and for many use cases, having the most recent data, as opposed to recent data is not necessary.