lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Semantics of a closed IndexInput
Date Mon, 03 Apr 2006 21:59:47 GMT
Grant Ingersoll wrote:
> Should it be the case that you can clone a closed IndexInput and get a 
> valid object that is capable of reading?  B/c this is what I am seeing 
> in my Lazy implementation (note, it seems to work fine...)  I am just 
> not sure if it should work or if it is a bug.

Cloned IndexInputs are assumed to share resources with the original. 
Lucene closes all original IndexInputs when the IndexReader is closed. 
Cloned IndexInputs should not be used after the IndexReader is closed. 
I don't think we bother to explicitly close clones (as they are 
frequently cached in ThreadLocals, etc.).

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