Use notify instead of notifyAll when only one thread affected by notification. (#165)
This commit is contained in:
parent
6beca2903c
commit
8b43209b8d
@ -491,7 +491,7 @@ public abstract class AbstractUdpListener
|
|||||||
queueStatistics.add(System.currentTimeMillis());
|
queueStatistics.add(System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
|
|
||||||
queue.notifyAll();
|
queue.notify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -797,7 +797,7 @@ public class MergingDatagramSocket
|
|||||||
queue.put(buffer);
|
queue.put(buffer);
|
||||||
synchronized (receiveLock)
|
synchronized (receiveLock)
|
||||||
{
|
{
|
||||||
receiveLock.notifyAll();
|
receiveLock.notify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (InterruptedException ie)
|
catch (InterruptedException ie)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user