hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r614701 - /httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
Date Wed, 23 Jan 2008 22:03:23 GMT
Author: olegk
Date: Wed Jan 23 14:03:21 2008
New Revision: 614701

URL: http://svn.apache.org/viewvc?rev=614701&view=rev
Log:
Moved selector wakeup call out of the synchronized (this.key) block (just in case)

Modified:
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java?rev=614701&r1=614700&r2=614701&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/IOSessionImpl.java
Wed Jan 23 14:03:21 2008
@@ -99,10 +99,8 @@
         if (this.status == CLOSED) {
             return;
         }
-        synchronized (this.key) {
-            this.key.interestOps(ops);
-            this.key.selector().wakeup();
-        }
+        this.key.interestOps(ops);
+        this.key.selector().wakeup();
     }
     
     public void setEvent(int op) {
@@ -112,8 +110,8 @@
         synchronized (this.key) {
             int ops = this.key.interestOps();
             this.key.interestOps(ops | op);
-            this.key.selector().wakeup();
         }
+        this.key.selector().wakeup();
     }
     
     public void clearEvent(int op) {
@@ -123,8 +121,8 @@
         synchronized (this.key) {
             int ops = this.key.interestOps();
             this.key.interestOps(ops & ~op);
-            this.key.selector().wakeup();
         }
+        this.key.selector().wakeup();
     }
     
     public int getSocketTimeout() {



Mime
View raw message