Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!usenet.pasdenom.info!news.albasani.net!news.mixmin.net!feeder.erje.net!fi.sn.net!newsfeed1.tdcnet.fi!news.song.fi!not-for-mail From: Jukka Lahtinen Newsgroups: comp.lang.java.programmer Subject: Re: A question about synchronized threads Organization: none References: <3f249d87-aaf8-4732-9ee8-fd112cf82553@f31g2000pri.googlegroups.com> <68sr88-fuj.ln1@dagon.net> X-no-archive: yes Content-Type: text/plain;charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: Sat, 30 Apr 2011 10:29:58 +0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:koFExOtl7eMjdIUt/Y0dC2Fr2r4= MIME-Version: 1.0 Lines: 18 NNTP-Posting-Host: 81.17.207.67 X-Trace: 1304148597 news.tdc.fi 2837 81.17.207.67:54767 X-Complaints-To: abuse@tdcnet.fi Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3316 Alice writes: > On 29/04/2011 6:55 PM, Dagon wrote: >> byhesed wrote: >>> The book explains above code: >>> Given an instance a of class A, when one thread is executing >>> a.m1(), another thread will be prohibited from executing a.m1() or a.m2(). >> Throw this book away and get a better one > Why? The statement he quoted is perfectly accurate. ..and the OP didn't even specify which book was quoted. (At least I didn't spot the name of the book or the author.) So nothing we have seen so far indicates anything wrong in the book. -- Jukka Lahtinen