Wait-free MPSC and MPMC implement in D
Shachar Shemesh
shachar at weka.io
Wed May 9 04:17:17 UTC 2018
On 09/05/18 01:09, David Nadlinger wrote:
> The algorithm isn't wait-free (haven't thought too carefully about this,
> though)
This mirrors a discussion I had with Maor (who originally wrote it).
Let's see if I bring you around the way I was brought around.
At the API level, there are two areas where the algorithm *cannot* be
wait free. If a consumer tries to consume from an empty queue, or a
producer tries to produce to a full one.
Those two aside (which, as I stated above, are not dependent on the
implementation), the algorithm actually is wait free.
> As far as industry-grade goes, note that many of the comments have not
> been updated since a previous combined implementation for SPMC/MPSC was
> split up into two types, so there is quite a bit of stale cruft around.
Will definitely have a second look.
Shachar
More information about the Digitalmars-d
mailing list