directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r164159 - /directory/network/trunk/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java
Date Fri, 22 Apr 2005 02:25:20 GMT
Author: trustin
Date: Thu Apr 21 19:25:18 2005
New Revision: 164159

URL: http://svn.apache.org/viewcvs?rev=164159&view=rev
Log:
Fixed: getPoolSize acquires wrong lock.

Modified:
    directory/network/trunk/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java

Modified: directory/network/trunk/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java?rev=164159&r1=164158&r2=164159&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/io/filter/IoThreadPoolFilter.java Thu
Apr 21 19:25:18 2005
@@ -89,9 +89,12 @@
     /**
      * Returns the number of threads in the thread pool.
      */
-    public synchronized int getPoolSize()
+    public int getPoolSize()
     {
-        return poolSize;
+        synchronized( poolSizeLock )
+        {
+            return poolSize;
+        }
     }
 
     /**



Mime
View raw message