+/*
+ * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
package org.opendaylight.controller.config.manager.impl;
import java.util.Deque;
public void run() {
ModuleIdentifierWithNanos old = new ModuleIdentifierWithNanos(); // null moduleId
while (this.isInterrupted() == false) {
- ModuleIdentifierWithNanos copy = new ModuleIdentifierWithNanos(DeadlockMonitor.this.top);
+ ModuleIdentifierWithNanos copy;
+ synchronized(this) {
+ copy = new ModuleIdentifierWithNanos(DeadlockMonitor.this.top);
+ }
+
if (old.moduleIdentifier == null || old.equals(copy) == false) {
// started
old = copy;
}
}
try {
- sleep(1000);
+ sleep(WARN_AFTER_MILLIS);
} catch (InterruptedException e) {
interrupt();
}