mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +01:00
Removed unnecessary locking.
This commit is contained in:
@@ -31,22 +31,13 @@ class PollingRemovableDriveMonitor implements RemovableDriveMonitor, Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void start(Callback callback) throws IOException {
|
public void start(Callback callback) throws IOException {
|
||||||
synchronized(this) {
|
this.callback = callback;
|
||||||
assert !running;
|
running = true;
|
||||||
assert this.callback == null;
|
|
||||||
running = true;
|
|
||||||
this.callback = callback;
|
|
||||||
}
|
|
||||||
pluginExecutor.execute(this);
|
pluginExecutor.execute(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stop() throws IOException {
|
public void stop() throws IOException {
|
||||||
synchronized(this) {
|
running = false;
|
||||||
assert running;
|
|
||||||
assert callback != null;
|
|
||||||
running = false;
|
|
||||||
callback = null;
|
|
||||||
}
|
|
||||||
synchronized(pollingLock) {
|
synchronized(pollingLock) {
|
||||||
pollingLock.notifyAll();
|
pollingLock.notifyAll();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user