martinmoene / ring-span-lite

ring-span lite - A C++yy-like ring_span type for C++98, C++11 and later in a single-file header-only library
Boost Software License 1.0
152 stars 12 forks source link

Atomic push/pop #19

Open liarokapisv opened 4 years ago

liarokapisv commented 4 years ago

Are ring-span's push/pop safe for unsynchronized consumer/producer scenarios? Does it even make sense to support such functionality given ring-span's domain (eg by using a policy) or does it make sense to write a wrapper on top of it to provide atomicity? On the top of my head writing a lock-free wrapper on top of ring-span does not seem possible. Modifying ring-span should be more straightforward in comparison. Then again the iterator-based functionality may not be suitable for such usage so maybe this should be out of scope.