From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,371144ace2969d7e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!p6g2000vbn.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: C++ primer on multithreading Date: Fri, 22 Apr 2011 14:45:02 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <9014siefelqm$.18a5dek2p9s4h$.dlg@40tude.net> <4c5fb8d6-7785-4c9f-bcf0-2bf6b3bb2cb0@e26g2000vbz.googlegroups.com> <1fr5ppc41ca7u.1oh598fh7fh9w.dlg@40tude.net> NNTP-Posting-Host: 77.65.97.192 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1303508708 20730 127.0.0.1 (22 Apr 2011 21:45:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 22 Apr 2011 21:45:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p6g2000vbn.googlegroups.com; posting-host=77.65.97.192; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19962 Date: 2011-04-22T14:45:02-07:00 List-Id: On Apr 22, 10:38=A0am, "Dmitry A. Kazakov" wrote: > > What "pulse event"? They are not needed at all. > > Pulse event is an event reset automatically after notification all waitin= g > threads. That's why they are not needed here. After putting new item to the queue (or removing one item - as already said, these are symmetric problems), you need to wake up only one waiting thread, not all of them. -- Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com