You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by se...@apache.org on 2009/03/20 13:49:08 UTC

svn commit: r756435 - in /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm: WaitingThread.java WaitingThreadAborter.java

Author: sebb
Date: Fri Mar 20 12:49:08 2009
New Revision: 756435

URL: http://svn.apache.org/viewvc?rev=756435&view=rev
Log:
Document thread-safety

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThread.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThreadAborter.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThread.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThread.java?rev=756435&r1=756434&r2=756435&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThread.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThread.java Fri Mar 20 12:49:08 2009
@@ -34,6 +34,7 @@
 import java.util.Date;
 import java.util.concurrent.locks.Condition;
 
+import net.jcip.annotations.NotThreadSafe;
 
 /**
  * Represents a thread waiting for a connection.
@@ -48,6 +49,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe
 public class WaitingThread {
 
     /** The condition on which the thread is waiting. */

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThreadAborter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThreadAborter.java?rev=756435&r1=756434&r2=756435&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThreadAborter.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/WaitingThreadAborter.java Fri Mar 20 12:49:08 2009
@@ -30,11 +30,17 @@
 
 package org.apache.http.impl.conn.tsccm;
 
-/** A simple class that can interrupt a {@link WaitingThread}. */
-/**
- *
+import net.jcip.annotations.NotThreadSafe;
+
+// TODO - only called from ConnPoolByRoute currently; consider adding it as nested class
+/** 
+ * A simple class that can interrupt a {@link WaitingThread}.
+ * 
+ * Must be called with the pool lock held.
+ * 
  * @since 4.0
  */
+@NotThreadSafe
 public class WaitingThreadAborter {
     
     private WaitingThread waitingThread;