Use notify instead of notifyAll when only one thread affected by notification. (#165)

This commit is contained in:
Yury Yaroshevich 2018-12-19 19:31:58 +03:00 committed by bbaldino
parent 6beca2903c
commit 8b43209b8d
2 changed files with 2 additions and 2 deletions

View File

@ -491,7 +491,7 @@ public abstract class AbstractUdpListener
queueStatistics.add(System.currentTimeMillis());
}
queue.notifyAll();
queue.notify();
}
}

View File

@ -797,7 +797,7 @@ public class MergingDatagramSocket
queue.put(buffer);
synchronized (receiveLock)
{
receiveLock.notifyAll();
receiveLock.notify();
}
}
catch (InterruptedException ie)