Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: Infinite loop from HashMap.keySet iteration. Date: Thu, 14 Jun 2012 11:34:35 -0700 Organization: Canadian Mind Products Lines: 16 Message-ID: References: Reply-To: Roedy Green NNTP-Posting-Host: Z2l1DcCELS0rATq8NqV4Sw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: csiph.com comp.lang.java.programmer:15286 On Thu, 14 Jun 2012 09:54:59 -0700, Daniel Pitts wrote, quoted or indirectly quoted someone who said : >This may look "safe", but really the resultsMap internal data structure >can become inconsistent because it is being accessed by two threads at >the same time. I did a cursory glance, but are you not modifying the values of keys? That is a definite no no, even on the same thread. -- Roedy Green Canadian Mind Products http://mindprod.com Controlling complexity is the essence of computer programming. ~ Brian W. Kernighan 1942-01-01 .