4 ms·
How can I make a lock free queue without OS support, ESP32?
by brcmthrowaway 3mo ago
How can I make a lock free queue without OS support, ESP32?
- stackghost 3mo agoI'd ask your friendly neighborhood LLM for design advice, but off the top of my head, so long as `static_assert(std::atomic<whatever>::is_lock_free)` passes, you could build a lock-free SPSC queue with just plain ol' std::atomics and probably liberal use of `alignas()` calls
- saghm 3mo agoMost local LLMs I've used are not particularly great with the advice unfortunately, probably because I haven't spent thousands of dollars on new hardware recently
- stackghost 3mo agoEdited my comment for clarity. I meant "friendly local" as a euphemism, like "neighborhood pub". Anyways. Ask Claude.
- saghm 3mo agoFair enough! It occurred to me after sending my comment that maybe you didn't mean it literally, but I'm easily confused, so clarity is helpful!