LUCENE-10583: Add docstring warning to not lock on Lucene objects (#963)

* add locking warning to docstring

* git tidy
This commit is contained in:
Vigya Sharma 2022-07-21 03:35:17 -07:00 committed by GitHub
parent 1bc38b7d1f
commit 25a842d871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,10 @@ import org.apache.lucene.util.IOUtils;
* java.nio.file.FileAlreadyExistsException}.
* </ul>
*
* <p><b>NOTE:</b> If your application requires external synchronization, you should <b>not</b>
* synchronize on the <code>Directory</code> implementation instance as this may cause deadlock; use
* your own (non-Lucene) objects instead.
*
* @see FSDirectory
* @see ByteBuffersDirectory
* @see FilterDirectory

View File

@ -77,6 +77,10 @@ import org.apache.lucene.util.SuppressForbidden;
* Thread#interrupt()} or {@link Future#cancel(boolean)} you should use the legacy {@code
* RAFDirectory} from the Lucene {@code misc} module in favor of {@link MMapDirectory}.
*
* <p><b>NOTE:</b> If your application requires external synchronization, you should <b>not</b>
* synchronize on the <code>MMapDirectory</code> instance as this may cause deadlock; use your own
* (non-Lucene) objects instead.
*
* @see <a href="http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html">Blog post
* about MMapDirectory</a>
*/