Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: Java thread Date: Sun, 11 Sep 2011 08:32:44 -0700 Organization: Canadian Mind Products Lines: 21 Message-ID: References: <128ea2e0-7a2e-4c86-9507-8e15a0b892b9@p25g2000pri.googlegroups.com> Reply-To: Roedy Green NNTP-Posting-Host: RCd/Ul4tyxGUBII8WGwa5g.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: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7804 On Sat, 10 Sep 2011 21:03:24 -0700 (PDT), Jack wrote, quoted or indirectly quoted someone who said : >For Java thread, how to ensure that wait() does not miss notify()? >Otherwise the thread will hang and can not shut down. Ordinary programmers almost never use wait/notify directly, unless they were experimenting to understand them. Instead, you rely on code written my Doug Lea and other experts. It is so easy for mortals to write code that works only most of the time. See http://mindprod.com/jgloss/timer.html http://mindprod.com/jgloss/concurrent.html http://mindprod.com/jgloss/thread.html -- Roedy Green Canadian Mind Products http://mindprod.com The modern conservative is engaged in one of man's oldest exercises in moral philosophy; that is, the search for a superior moral justification for selfishness. ~ John Kenneth Galbraith (born: 1908-10-15 died: 2006-04-29 at age: 97)