Non-blocking array queue.
Martin
martinbbjerregaard at gmail.com
Sat Mar 8 11:58:01 PST 2014
On Saturday, 8 March 2014 at 19:02:26 UTC, Shammah Chancellor
wrote:
> Hi,
>
> I'm interesting in implementing a non-blocking queue. My
> thought is to use a fixed-size array, and increment back of the
> queue with a integer. I was thinking I could make this
> non-blocking via an atomic increment operation before assigning
> the pushed value onto the queue. So, my question is: How
> would you do an atomic increment in a cross-platform way in D?
>
>
> Thanks!
> -S.
I think you could use http://dlang.org/phobos/core_atomic.html,
maybe?
More information about the Digitalmars-d-learn
mailing list