Made sure interestOps is updated before OIO thread is interrupted

This commit is contained in:
Trustin Lee 2009-06-05 07:01:13 +00:00
parent 5273e274de
commit 663fe81af2

View File

@ -159,6 +159,8 @@ class OioWorker implements Runnable {
future.setSuccess(); future.setSuccess();
if (changed) { if (changed) {
channel.setInterestOpsNow(interestOps);
// Notify the worker so it stops or continues reading. // Notify the worker so it stops or continues reading.
Thread currentThread = Thread.currentThread(); Thread currentThread = Thread.currentThread();
Thread workerThread = channel.workerThread; Thread workerThread = channel.workerThread;
@ -166,7 +168,6 @@ class OioWorker implements Runnable {
workerThread.interrupt(); workerThread.interrupt();
} }
channel.setInterestOpsNow(interestOps);
fireChannelInterestChanged(channel); fireChannelInterestChanged(channel);
} }
} catch (Throwable t) { } catch (Throwable t) {