On Thu, Oct 18, 2018 at 10:02 AM Anthony Williams <anthony....@gmail.com> wrote:
>
> On 18/10/2018 09:23, 饶萌 wrote:
> > I've just created a real wait-free MPMC queue in 100+ lines of C++11
> > code: WFMPMC <https://github.com/MengRao/WFMPMC>.
> >
> > Appreciate it if you can help check.
>
> This is not wait free. If you have two writers, and both take an index.
> The writer with the lower index then gets suspended, but the writer with
> the higher index completes.
>
> Now, the next reader has to wait, because the slot it is trying to read
> from isn't complete yet, even though there is ready data in another slot.

Hi Anthony,

This sounds more like non-linerizable rather then non-wait-free.
I guess wait-free property only makes sense for _try_ push/pop
operations. TryPop won't block, but it can [falsely] return false
because a future pop appears to happen before a preceding push.
Non-linerizability may or may not be a problem depending on particular
use case.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Scalable Synchronization Algorithms" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to lock-free+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/lock-free/CAEeQi3tDw_%2BxUWxHB5z90B9pc3yCZUutvQZGuEuUX0s2GUUQVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to