mirror of https://github.com/apache/activemq.git
added better synchronization
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@550797 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8a5387f6ad
commit
8a0157a506
|
@ -307,10 +307,12 @@ public class UsageManager implements Service{
|
|||
}
|
||||
|
||||
private void setPercentUsage(int value) {
|
||||
int oldValue = percentUsage;
|
||||
percentUsage = value;
|
||||
if( oldValue!=value ) {
|
||||
fireEvent(oldValue, value);
|
||||
synchronized (usageMutex) {
|
||||
int oldValue = percentUsage;
|
||||
percentUsage = value;
|
||||
if( oldValue!=value ) {
|
||||
fireEvent(oldValue, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue