Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Henderson Newsgroups: comp.lang.java.programmer Subject: Re: Why "lock" functionality is introduced for all the objects? Date: Fri, 22 Jul 2011 00:20:47 -0400 Organization: e1 Lines: 16 Message-ID: References: <4e28c4c4$0$308$14726298@news.sunsite.dk> NNTP-Posting-Host: h1MICDOSuUTFyvkTQ7BjNQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: WinVN 0.99.12z (x86 32bit) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6393 On 21/07/2011 8:30 PM, Arne Vajhøj wrote: > On 6/30/2011 6:04 PM, Tom Anderson wrote: >> On Tue, 28 Jun 2011, Alex J wrote: >>> The better decision, IMHO, would be to introduce lock/wait mechanics >>> for only, say, the Lockable descendants. >> >> I agree with this, actually. There might be some small performance >> improvement, but it would also make the locking behaviour of code more >> explicit, and so clearer. > > Given that Java does not allow multiple inheritance then that would > have been tough restriction. Others suggested that Lockable could have been a marker interface with special significance to the compiler, ala Serializable. Java allows multiple inheritance of interfaces.