Made sure interestOps is updated before OIO thread is interrupted

This commit is contained in:
Trustin Lee 2009-06-05 07:00:55 +00:00
parent 76777b74b4
commit 5273e274de

View File

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