220 24 <-7447476526686364750@unknownmsgid> article
Path: news.gmane.org!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Lock free fifo, stack
Date: Sun, 11 Nov 2012 06:54:26 -0000
Lines: 233
Approved: news@gmane.org
Message-ID: <-7447476526686364750@unknownmsgid>
References: <e55202d1-5a44-4a54-a3cb-a593aa89ea1b@isocpp.org>
 <8ea5f6a7-f498-45a8-8baa-099fec4e5530@isocpp.org> <51f92d9d-5865-4fbf-938d-1d87aaaa68df@isocpp.org>
 <ac80b45f-d486-401c-a455-911b619d013e@isocpp.org> <067243b6-0385-4fd2-b71b-52ce55c31b20@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=20cf3074b692ed438804ce32a7ca
X-Trace: ger.gmane.org 1352616868 10720 80.91.229.3 (11 Nov 2012 06:54:28 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sun, 11 Nov 2012 06:54:28 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUZ5QWKNQIKJF75QQCRUBAV7J4US@isocpp.org Sun Nov 11 07:54:39 2012
Return-path: <std-proposals+bncBCUZ5QWKNQIKJF75QQCRUBAV7J4US@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yh0-f70.google.com ([209.85.213.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIKJF75QQCRUBAV7J4US@isocpp.org>)
	id 1TXRRG-0003fT-DY
	for gclcip-std-proposals@m.gmane.org; Sun, 11 Nov 2012 07:54:38 +0100
Original-Received: by mail-yh0-f70.google.com with SMTP id o21sf8987519yho.9
        for <gclcip-std-proposals@m.gmane.org>; Sat, 10 Nov 2012 22:54:28 -0800 (PST)
Original-Received: by 10.224.205.65 with SMTP id fp1mr7255414qab.4.1352616868595;
        Sat, 10 Nov 2012 22:54:28 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.224.52.141 with SMTP id i13ls10241894qag.7.gmail; Sat, 10 Nov
 2012 22:54:28 -0800 (PST)
Original-Received: by 10.49.118.40 with SMTP id kj8mr23348317qeb.64.1352616868144;
        Sat, 10 Nov 2012 22:54:28 -0800 (PST)
Original-Received: by 10.49.118.40 with SMTP id kj8mr23348316qeb.64.1352616868101;
        Sat, 10 Nov 2012 22:54:28 -0800 (PST)
Original-Received: from mail-qa0-f51.google.com (mail-qa0-f51.google.com [209.85.216.51])
        by mx.google.com with ESMTPS id m17si835114qct.36.2012.11.10.22.54.28
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sat, 10 Nov 2012 22:54:28 -0800 (PST)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 209.85.216.51 as permitted sender) client-ip=209.85.216.51;
Original-Received: by mail-qa0-f51.google.com with SMTP id t11so1226517qaa.17
        for <std-proposals@isocpp.org>; Sat, 10 Nov 2012 22:54:28 -0800 (PST)
Original-Received: by 10.224.222.137 with SMTP id ig9mr20126454qab.65.1352616867873;
 Sat, 10 Nov 2012 22:54:27 -0800 (PST)
X-Client-ID: 746
X-Mailer: BlackBerry Email (2.1.0.1088)
In-Reply-To: 067243b6-0385-4fd2-b71b-52ce55c31b20@isocpp.org
X-Priority: 3 (normal)
X-MSMail-Priority: Normal
Importance: Normal
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain
 of tvaneerd@gmail.com designates 209.85.216.51 as permitted sender)
 smtp.mail=tvaneerd@gmail.com; dkim=pass header.i=@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:24
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24>

--20cf3074b692ed438804ce32a7ca
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

There are also lockfree structures currently making their way into boost.

Sent from my BlackBerry=AE PlayBook=99
www.blackberry.com

------------------------------
*From:* "adrien courdavault" <adrien59cadri@gmail.com>
*To:* "std-proposals@isocpp.org" <std-proposals@isocpp.org>
*Sent:* 5 November, 2012 5:20 PM
*Subject:* [std-proposals] Re: Lock free fifo, stack

Yes there is a non free commercial version indead.

Le lundi 5 novembre 2012 22:48:21 UTC+1, DeadMG a =E9crit :
>
> I believe one of the study groups is a concurrency working group, which i=
s
> looking at this. TBB is commercial, as well as GPL, I think.
>
> On Monday, November 5, 2012 9:38:38 PM UTC, adrien courdavault wrote:
>>
>> Thank you for the information.
>> When you say the standard is looking at it, do you mean it is already
>> studied by one of the groups ?
>>
>> I did not know about the PPL.
>> However I remember having a look at Intel's TBB but I think this is GPL.
>>
>> Best
>>
>> Le lundi 5 novembre 2012 22:19:27 UTC+1, DeadMG a =E9crit :
>>>
>>> The Standard is certainly looking at adding it. But you can find
>>> high-quality implementations in TBB and PPL.
>>>
>>> On Monday, November 5, 2012 8:38:37 PM UTC, adrien courdavault wrote:
>>>>
>>>> *Hi everyone,
>>>>
>>>> I work in the domain of real-time audio processing. A problem that is
>>>> really common is to have a high priority thread (the audio device call=
back)
>>>> needing to send, receive messages or exchange data in general with oth=
er
>>>> thread (like the main application thread running the GUI).
>>>>
>>>> To do this I use Lock free FIFOs most of the time. The code I have for
>>>> this is based on the publications of Herb Sutter among others. Here is=
 a
>>>> list of interesting articles about this issue :
>>>> http://globalengineer.wordpress.com/2008/10/31/lock-free-queue-article=
s-on-dr-dobbs-journal/
>>>>
>>>> I=92m really happy to see the new <atomic> feature, it is so nice beca=
use
>>>> I will not have to write CompareAndSwapInt macros anymore to have port=
able
>>>> code between MacOS, and Windows (and soon perhaps Android, iOS =85), t=
hat
>>>> will clearly make my code simpler. Also I see that there is a group wo=
rking
>>>> hard on the transactional memory problem. And this is also important
>>>> because I=92m not really good with the memory barriers issues but I ha=
d to
>>>> code something using non-portable API to do create a multi writer mult=
i
>>>> reader FIFO that is really thread safe on multi core architectures and=
 I
>>>> hope that the SG5 will make my life easier and this implementation saf=
er
>>>> with more clean code.
>>>>
>>>> So I just wonder, why not adding lock free FIFO to the standard ? (As =
I
>>>> think I might not be the only one with this issue). And obviously this=
 idea
>>>> can be extended to more containers even if I don=92t think it would be=
 useful
>>>> for any container.
>>>>
>>>> In my search for existing libraries that are LGPL or other open
>>>> licenses, I found this http://www.liblfds.org/, where there is such a
>>>> library without any license.
>>>>
>>>> Would you think this would be useful to have this ?
>>>>
>>>> Note :
>>>> I don=92t know if this is already included in any other proposal, I di=
d
>>>> not find this in the forum of future proposals and I don=92t think thi=
s is
>>>> already a part of the standard nor the SG5 papers.
>>>> I=92m really sorry if I was wrong, if this already exist, could you
>>>> please tell me.*
>>>>
>>>  --

--=20




--20cf3074b692ed438804ce32a7ca
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

<html><head></head><body>There are also lockfree structures currently makin=
g their way into boost.<br><br><div id=3D"1330154144936-sig-id">Sent from m=
y BlackBerry=AE PlayBook=99<br><a href=3D"http://www.blackberry.com">www.bl=
ackberry.com</a></div>
<br><hr><div><strong>From:</strong> &quot;adrien courdavault&quot; &lt;<a h=
ref=3D"mailto:adrien59cadri@gmail.com">adrien59cadri@gmail.com</a>&gt;<br><=
strong>To:</strong> &quot;<a href=3D"mailto:std-proposals@isocpp.org">std-p=
roposals@isocpp.org</a>&quot; &lt;<a href=3D"mailto:std-proposals@isocpp.or=
g">std-proposals@isocpp.org</a>&gt;<br>
<strong>Sent:</strong> 5 November, 2012 5:20 PM<br><strong>Subject:</strong=
> [std-proposals] Re: Lock free fifo, stack<br></div><br>Yes there is a non=
 free commercial version indead.<div><br></div><div>Le lundi 5 novembre 201=
2 22:48:21 UTC+1, DeadMG a =E9crit=A0:<blockquote class=3D"gmail_quote" sty=
le=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1e=
x">
I believe one of the study groups is a concurrency working group, which is =
looking at this. TBB is commercial, as well as GPL, I think.<br><br>On Mond=
ay, November 5, 2012 9:38:38 PM UTC, adrien courdavault wrote:<blockquote c=
lass=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #c=
cc solid;padding-left:1ex">
Thank you for the information.<div>When you say the standard is looking at =
it, do you mean it is already studied by one of the groups ?</div><div><br>=
</div><div>I did not know about the PPL.</div><div>However I remember havin=
g a look at Intel&#39;s TBB but I think this is GPL.</div>
<div><br></div><div>Best<br><br>Le lundi 5 novembre 2012 22:19:27 UTC+1, De=
adMG a =E9crit=A0:<blockquote class=3D"gmail_quote" style=3D"margin:0;margi=
n-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">The Standard is c=
ertainly looking at adding it. But you can find high-quality implementation=
s in TBB and PPL.<br>
<br>On Monday, November 5, 2012 8:38:37 PM UTC, adrien courdavault wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-=
left:1px #ccc solid;padding-left:1ex"><b style=3D"color:rgb(0,0,0);font-fam=
ily:&#39;Times New Roman&#39;;font-size:medium;font-weight:normal"><span st=
yle=3D"font-size:15px;font-family:Arial;background-color:transparent;white-=
space:pre-wrap">Hi everyone,</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">I work in the do=
main of real-time audio processing. A problem that is really common is to h=
ave a high priority thread (the audio device callback) needing to send, rec=
eive messages or exchange data in general with other thread (like the main =
application thread running the GUI).</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">To do this I use=
 </span><span style=3D"font-size:15px;font-family:Arial;background-color:tr=
ansparent;font-weight:bold;white-space:pre-wrap">Lock free FIFOs</span><spa=
n style=3D"font-size:15px;font-family:Arial;background-color:transparent;wh=
ite-space:pre-wrap"> most of the time. The code I have for this is based on=
 the publications of Herb Sutter among others. Here is a list of interestin=
g articles about this issue : </span><a href=3D"http://globalengineer.wordp=
ress.com/2008/10/31/lock-free-queue-articles-on-dr-dobbs-journal/" target=
=3D"_blank"><span style=3D"font-size:15px;font-family:Arial;background-colo=
r:transparent;text-decoration:underline;white-space:pre-wrap">http://global=
engineer.wordpress.com/2008/10/31/lock-free-queue-articles-on-dr-dobbs-jour=
nal/</span></a><span style=3D"font-size:15px;font-family:Arial;background-c=
olor:transparent;white-space:pre-wrap"></span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">I=92m really hap=
py to see the new &lt;atomic&gt; feature, it is so nice because I will not =
have to write CompareAndSwapInt macros anymore to have portable code betwee=
n MacOS, and Windows (and soon perhaps Android, iOS =85), that will clearly=
 make my code simpler. Also I see that there is a group working hard on the=
 transactional memory problem. And this is also important because I=92m not=
 really good with the memory barriers issues but I had to code something us=
ing non-portable API to do create a multi writer multi reader FIFO that is =
really thread safe on multi core architectures and I hope that the SG5 will=
 make my life easier and this implementation safer with more clean code.</s=
pan><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">So I just wonder=
, why not adding lock free FIFO to the standard ? (As I think I might not b=
e the only one with this issue). And obviously this idea can be extended to=
 more containers even if I don=92t think it would be useful for any contain=
er.</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">In my search for=
 existing libraries that are LGPL or other open licenses, I found this </sp=
an><a href=3D"http://www.liblfds.org/" target=3D"_blank"><span style=3D"fon=
t-size:15px;font-family:Arial;background-color:transparent;text-decoration:=
underline;white-space:pre-wrap">http://www.liblfds.org/</span></a><span sty=
le=3D"font-size:15px;font-family:Arial;background-color:transparent;white-s=
pace:pre-wrap">, where there is such a library without any license.</span><=
br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">Would you think =
this would be useful to have this ?</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">Note :</span><br=
>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap">I don=92t know if this is already included in any o=
ther proposal, I did not find this in the forum of future proposals and I d=
on=92t think this is already a part of the standard nor the SG5 papers.</sp=
an><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap">I=92m really sorry if I was wrong, if this already =
exist, could you please tell me.</span></b><br></blockquote></blockquote></=
div>
</blockquote></blockquote></div>

<p></p>

-- <br>
=A0<br>
=A0<br>
=A0<br>
</body></html>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

--20cf3074b692ed438804ce32a7ca--

.
