estdlib
estdlib copied to clipboard
layer1::deque thread safety
Upgrade layer1::deque circular queue to use a burn-the-bool/burn-the-slot (sentinel) approach. In particular, the model where one queue slot is burned to know if we're full or empty.
In doing so, upgrade to use std::atomic/_Atomic
Consider also adding another mode where we never know if we're full
Consider configuring one of these 3 modes (bool, slot burn, minimal) via TPolicy
Interesting support articles: https://embeddedartistry.com/blog/2017/05/17/creating-a-circular-buffer-in-c-and-c/?utm_source=chatgpt.com https://docs.kernel.org/core-api/circular-buffers.html
Take this opportunity also to more carefully (and perhaps automatically) select between uninitialized_array and native array