mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4361 - implement suggestion from Sam hendley with thanks, avoid the IllegalMonitorStateException
This commit is contained in:
parent
6f524bfea0
commit
9ddd162d25
|
@ -74,9 +74,9 @@ public class MemoryUsage extends Usage<MemoryUsage> {
|
||||||
while (percentUsage >= 100 && isStarted()) {
|
while (percentUsage >= 100 && isStarted()) {
|
||||||
waitForSpaceCondition.await();
|
waitForSpaceCondition.await();
|
||||||
}
|
}
|
||||||
usageLock.readLock().lock();
|
|
||||||
} finally {
|
} finally {
|
||||||
usageLock.writeLock().unlock();
|
usageLock.writeLock().unlock();
|
||||||
|
usageLock.readLock().lock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue