Comments to indicate which locks guard which variables.

This commit is contained in:
akwizgran
2015-01-29 11:05:46 +00:00
parent 47bd84122e
commit 0dbfd7073f
21 changed files with 235 additions and 1092 deletions

View File

@@ -9,12 +9,12 @@ import org.briarproject.api.lifecycle.ShutdownManager;
class ShutdownManagerImpl implements ShutdownManager {
protected final Map<Integer, Thread> hooks;
private int nextHandle = 0;
private final Lock synchLock = new ReentrantLock();
// The following are locking: synchLock
protected final Map<Integer, Thread> hooks;
private int nextHandle = 0;
ShutdownManagerImpl() {
hooks = new HashMap<Integer, Thread>();
}