Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Alexander Terekhov Newsgroups: comp.programming.threads Subject: Re: usage of vyukov's mpsc queue Date: Wed, 21 Sep 2011 15:18:41 +0200 Organization: A noiseless patient Spider Lines: 18 Message-ID: <4E79E431.59EFC897@web.de> References: <3b312755-24d8-4505-8cfe-1644c458c4d5@j1g2000yqn.googlegroups.com> <4E79BA45.B3622870@web.de> <2011092106580817537-ephisinowitz@yahoocom> <4E79D246.E338E050@web.de> <39ca082e-34ad-43f5-8f6d-9944ae840875@l4g2000vbv.googlegroups.com> Reply-To: terekhov@web.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="MCbSEzW5qwGLFMNXJh39IQ"; logging-data="12359"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18eqZGEczELbCCIe6KuE+YFUSIL022sx38=" X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en Cancel-Lock: sha1:mbV1C7NXpYXBkO4CQzgHzn9x1Hc= Xref: x330-a1.tempe.blueboxinc.net comp.programming.threads:588 Ephi Sinowitz wrote: [...] > OK I think I get it. Even though I am setting an event after each push > there is no guarantee of visiblity on the next pointer. However if I The whole point of "vyukov's mpsc queue" is to get rid of blocking syncronization objects. > am correct, looping on the consumer should remove the need for the > store-release / load-acquire on the next pointer. Like so. Does that > make sense? You'd need a counting semaphore, not auto-reset event (which is binary semaphore). regards, alexander.