Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Volatile happens before question Date: Thu, 19 Jan 2012 13:38:40 -0800 Organization: A noiseless patient Spider Lines: 26 Message-ID: References: <09848313-2372-4c23-8f52-fa84c612c100@u32g2000yqe.googlegroups.com> <1pi7kea3zdo0b.1ixhuq3p9ybbu$.dlg@40tude.net> <60dddbf9-3686-4824-a918-64a59faba177@a8g2000vba.googlegroups.com> <726da9ce-57f4-4136-b50b-56a032aca196@f1g2000yqi.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 19 Jan 2012 21:38:42 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="26901"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mJu4zlv7xoQZ549oN5j4XlXXTpIwpo3M=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: Cancel-Lock: sha1:oLAmq45Ggt4yDiA0M3hvRrt2K54= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11503 On 1/19/2012 12:46 PM, Daniel Pitts wrote: > On 1/18/12 11:59 AM, markspace wrote: >> (Hint: ConcurrentHashMap > Agreed, if you need this behavior. On the other hand, if you are > experimenting with concurrency code, rather than trying to write > concurrent applications, then this thread is more useful than knowing > about CHM. Yes, this thread is excellent for learning stuff and making me look stuff up and justify what I think I know about concurrency. However, I'd like to point out that M. Bartosz Milewski says that developing lock-free algorithms are the subject of P.h.D. dissertations that take years of peer review before they're finally deemed correct. There's no way I'd put any of the code on this thread into production! Please stick to the Java API for production code, that's stuff is already debugged! ;-) >> ) >> >