lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Lock class question
Date Mon, 24 Oct 2005 16:12:23 GMT
Marvin Humphrey wrote:
> What are the advantages of the With class?  Why not just obtain the  
> lock, run a block, and release the lock?

The release should be in a 'finally' block.  'With' enforces that.

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message