lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: Lock class question
Date Mon, 24 Oct 2005 18:41:10 GMT

On Oct 24, 2005, at 9:12 AM, Doug Cutting wrote:

> 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.

Ah.  No 'finally' blocks in Perl, but I can mimic the flow using eval  
[BLOCK], and achieve the "enforcement" aspect.

Thanks,

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


---------------------------------------------------------------------
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