Topic: Lockfree RingQueue
Author: Robin Rowe <robinsrowe@gmail.com>
Date: Wed, 14 Nov 2018 12:27:52 -0800
Raw View
Long ago, I made a failed attempt to create a lockfree queue based on a
ring buffer. Everyone here was very helpful pointing out where that had
race conditions or needed design improvements. Thanks.
Am giving it another go:
https://github.com/robinrowe/multiprocessing/blob/master/RingQueue.h
Simple single-threaded test case in test_queue.cpp. RingQueue.h has the
implementation. Other files in repo are a work in progress, may ignore.
Although it will build, at this point am only asking for a desk check.
What flaws does class RingQueue have as a lockfree single producer
(push) and single consumer (pop) queue? What are the race conditions?
If more appropriate, respond off-list. And, if there's another list you
recommend I ask this, let me know off-list.
Thank you!
Robin
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/cfce55db-d1e9-3bfe-564d-80c0a408059d%40gmail.com.
.
Author: Itaj Sherman <itajsherman@gmail.com>
Date: Wed, 14 Nov 2018 19:48:23 -0800 (PST)
Raw View
------=_Part_332_926543503.1542253703273
Content-Type: multipart/alternative;
boundary="----=_Part_333_1058803604.1542253703273"
------=_Part_333_1058803604.1542253703273
Content-Type: text/plain; charset="UTF-8"
Have you seen the lectures about lock-free queue by Tony Van Eerd?
These are great, you should watch.
https://www.youtube.com/watch?v=mu6XB-WRNxs&t=2562s
https://www.youtube.com/watch?v=HP2InVqgBFM
https://www.youtube.com/watch?v=Xf35TLFKiO8&t=2166s
itaj
On Wednesday, 14 November 2018 22:27:59 UTC+2, Robin Rowe wrote:
>
> Long ago, I made a failed attempt to create a lockfree queue based on a
> ring buffer. Everyone here was very helpful pointing out where that had
> race conditions or needed design improvements. Thanks.
>
> Am giving it another go:
>
> https://github.com/robinrowe/multiprocessing/blob/master/RingQueue.h
>
> Simple single-threaded test case in test_queue.cpp. RingQueue.h has the
> implementation. Other files in repo are a work in progress, may ignore.
> Although it will build, at this point am only asking for a desk check.
>
> What flaws does class RingQueue have as a lockfree single producer
> (push) and single consumer (pop) queue? What are the race conditions?
>
> If more appropriate, respond off-list. And, if there's another list you
> recommend I ask this, let me know off-list.
>
> Thank you!
>
> Robin
>
>
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/62bb5c03-08cb-4950-898e-90e3339b4bc2%40isocpp.org.
------=_Part_333_1058803604.1542253703273
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Have you seen the lectures about lock-free queue by Tony V=
an Eerd?<br>These are great, you should watch.<br><br>https://www.youtube.c=
om/watch?v=3Dmu6XB-WRNxs&t=3D2562s<br>https://www.youtube.com/watch?v=
=3DHP2InVqgBFM<br><div>https://www.youtube.com/watch?v=3DXf35TLFKiO8&t=
=3D2166s</div><div><br></div><div>itaj<br><br>On Wednesday, 14 November 201=
8 22:27:59 UTC+2, Robin Rowe wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;">Long ago, I made a failed attempt to create a lockfree queue based on=
a=20
<br>ring buffer. Everyone here was very helpful pointing out where that had=
=20
<br>race conditions or needed design improvements. Thanks.
<br>
<br>Am giving it another go:
<br>
<br>=C2=A0 =C2=A0<a href=3D"https://github.com/robinrowe/multiprocessing/bl=
ob/master/RingQueue.h" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"th=
is.href=3D'https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fr=
obinrowe%2Fmultiprocessing%2Fblob%2Fmaster%2FRingQueue.h\x26sa\x3dD\x26sntz=
\x3d1\x26usg\x3dAFQjCNG02EJMg4eSmUKxpvOJF8QRL_wvNg';return true;" oncli=
ck=3D"this.href=3D'https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub=
..com%2Frobinrowe%2Fmultiprocessing%2Fblob%2Fmaster%2FRingQueue.h\x26sa\x3dD=
\x26sntz\x3d1\x26usg\x3dAFQjCNG02EJMg4eSmUKxpvOJF8QRL_wvNg';return true=
;">https://github.com/robinrowe/<wbr>multiprocessing/blob/master/<wbr>RingQ=
ueue.h</a>
<br>
<br>Simple single-threaded test case in test_queue.cpp. RingQueue.h has the=
=20
<br>implementation. Other files in repo are a work in progress, may ignore.=
=20
<br>Although it will build, at this point am only asking for a desk check.
<br>
<br>What flaws does class RingQueue have as a lockfree single producer=20
<br>(push) and single consumer (pop) queue? What are the race conditions?
<br>
<br>If more appropriate, respond off-list. And, if there's another list=
you=20
<br>recommend I ask this, let me know off-list.
<br>
<br>Thank you!
<br>
<br>Robin
<br>
<br></blockquote></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/62bb5c03-08cb-4950-898e-90e3339b4bc2%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/62bb5c03-08cb-4950-898e-90e3339b4bc2=
%40isocpp.org</a>.<br />
------=_Part_333_1058803604.1542253703273--
------=_Part_332_926543503.1542253703273--
.