mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Synchronize all the things
This commit is contained in:
parent
414623ba9f
commit
0f8c420351
@ -52,7 +52,7 @@ public abstract class Metric extends Thread {
|
||||
*
|
||||
* @param properties
|
||||
*/
|
||||
public void configure(final Properties properties) {
|
||||
public synchronized void configure(final Properties properties) {
|
||||
log.info("{} (re)loading config...", getName());
|
||||
|
||||
// only configure the Properties which belong to us
|
||||
@ -99,7 +99,10 @@ public abstract class Metric extends Thread {
|
||||
// TODO Auto-generated catch block
|
||||
}
|
||||
|
||||
execute();
|
||||
synchronized (this) {
|
||||
execute();
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(Long.parseLong(configuration.getProperty(INTERVAL)) * 1000);
|
||||
} catch (InterruptedException ignore) {
|
||||
@ -121,8 +124,10 @@ public abstract class Metric extends Thread {
|
||||
public void shutdown() {
|
||||
shutdown = true;
|
||||
|
||||
// interrupt the timer immediately so we can swiftly shut down
|
||||
this.interrupt();
|
||||
synchronized (this) {
|
||||
// interrupt the timer immediately so we can swiftly shut down
|
||||
this.interrupt();
|
||||
}
|
||||
log.debug("{} shutdown requested", getName());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user