ringbuffer
ringbuffer copied to clipboard
Enable a single reader to be synced up with the writer
Once you know how far behind you are with #3, it'd be nice if a reader can elect to zip forward to sync with the writer and skip a bunch of data. This would be a method like force_sync_all(), except it would hold the reader lock and only allow one reader to be moved. It must only be called by the reader who owns the Pointer being moved. The writer should only ever call force_sync_all(), which blocks all readers because it holds the writer lock.