You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by mi...@apache.org on 2009/07/29 12:18:31 UTC
svn commit: r798835 -
/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
Author: mikemccand
Date: Wed Jul 29 10:18:30 2009
New Revision: 798835
URL: http://svn.apache.org/viewvc?rev=798835&view=rev
Log:
LUCENE-1766: spell out IndexWriter's thread safety in the javadocs
Modified:
lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java?rev=798835&r1=798834&r2=798835&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java Wed Jul 29 10:18:30 2009
@@ -186,6 +186,15 @@
last commit. If you opened the writer with autoCommit
false you can also just call {@link #rollback()}
directly.</p>
+
+ <a name="thread-safety"></a><p><b>NOTE</b>: {@link
+ <code>IndexWriter</code>} instances are completely thread
+ safe, meaning multiple threads can call any of its
+ methods, concurrently. If your application requires
+ external synchronization, you should <b>not</b> use the
+ <code>IndexWriter</code> instance for synchronization as
+ this can lead to deadlock. Use a private
+ <code>Object</code> instead. </p>
*/
/*