On Tue, Feb 9, 2016 at 7:59 PM, Michael McCandless <luc...@mikemccandless.com> wrote: > Can't you just call ReaderManager.close? > > All in-flight operations with that RM will keep working, and the > underlying reader will only finally close once they have all finished.
I guess that has the caveat that it would be possible to have two readers open on the same directory, which is mostly what I was trying to avoid. My current solution absolutely prevents that, at the cost of having to synchronise when acquiring or releasing, although I can probably use double-checked locking to reduce the impact of that. Really what would be handy is something that resembles ReaderManager but takes Path for every method and also opens and closes the Directory... TX --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org