From 8d5b662535fc81cd1a5f825818d4de6658ae787a Mon Sep 17 00:00:00 2001
From: Michael McCandless
Date: Wed, 29 Jul 2009 10:18:30 +0000
Subject: [PATCH] LUCENE-1766: spell out IndexWriter's thread safety in the
javadocs
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@798835 13f79535-47bb-0310-9956-ffa450edef68
---
src/java/org/apache/lucene/index/IndexWriter.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/java/org/apache/lucene/index/IndexWriter.java b/src/java/org/apache/lucene/index/IndexWriter.java
index e673bc73cd8..e8c27960cf0 100644
--- a/src/java/org/apache/lucene/index/IndexWriter.java
+++ b/src/java/org/apache/lucene/index/IndexWriter.java
@@ -186,6 +186,15 @@ import java.util.Map;
last commit. If you opened the writer with autoCommit
false you can also just call {@link #rollback()}
directly.
+
+ NOTE: {@link
+ IndexWriter
} instances are completely thread
+ safe, meaning multiple threads can call any of its
+ methods, concurrently. If your application requires
+ external synchronization, you should not use the
+ IndexWriter
instance for synchronization as
+ this can lead to deadlock. Use a private
+ Object
instead.
*/
/*