Potential fix for performance degradation introduced during NIO write optimization
This commit is contained in:
parent
dd5354858e
commit
77f1b2b4a0
@ -443,6 +443,11 @@ class NioDatagramWorker implements Runnable {
|
||||
return;
|
||||
}
|
||||
|
||||
if (channel.writeTaskInTaskQueue.get() && Thread.currentThread() != thread) {
|
||||
rescheduleWrite(channel);
|
||||
return;
|
||||
}
|
||||
|
||||
final NonReentrantLock writeLock = channel.writeLock;
|
||||
if (!writeLock.tryLock()) {
|
||||
rescheduleWrite(channel);
|
||||
|
@ -372,6 +372,11 @@ class NioWorker implements Runnable {
|
||||
return;
|
||||
}
|
||||
|
||||
if (channel.writeTaskInTaskQueue.get() && Thread.currentThread() != thread) {
|
||||
rescheduleWrite(channel);
|
||||
return;
|
||||
}
|
||||
|
||||
final NonReentrantLock writeLock = channel.writeLock;
|
||||
if (!writeLock.tryLock()) {
|
||||
rescheduleWrite(channel);
|
||||
|
Loading…
Reference in New Issue
Block a user