hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r756315 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
Date Fri, 20 Mar 2009 02:42:48 GMT
Author: sebb
Date: Fri Mar 20 02:42:48 2009
New Revision: 756315

URL: http://svn.apache.org/viewvc?rev=756315&view=rev
Log:
Document not thread safe

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

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java?rev=756315&r1=756314&r2=756315&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/AbstractConnPool.java
Fri Mar 20 02:42:48 2009
@@ -40,6 +40,9 @@
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
+import net.jcip.annotations.GuardedBy;
+import net.jcip.annotations.NotThreadSafe;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.conn.ConnectionPoolTimeoutException;
@@ -57,6 +60,7 @@
  *
  * @since 4.0
  */
+@NotThreadSafe // unsynch access to queues etc
 public abstract class AbstractConnPool implements RefQueueHandler {
 
     private final Log log = LogFactory.getLog(getClass());
@@ -80,6 +84,7 @@
     protected IdleConnectionHandler idleConnHandler;
 
     /** The current total number of connections. */
+    @GuardedBy("poolLock")
     protected int numConnections;
 
     /**



Mime
View raw message