Skip to content
Snippets Groups Projects
Commit 9a3157c3 authored by akwizgran's avatar akwizgran
Browse files

Removed unnecessary locking.

parent eb237e5b
No related branches found
No related tags found
No related merge requests found
......@@ -31,22 +31,13 @@ class PollingRemovableDriveMonitor implements RemovableDriveMonitor, Runnable {
}
public void start(Callback callback) throws IOException {
synchronized(this) {
assert !running;
assert this.callback == null;
running = true;
this.callback = callback;
}
this.callback = callback;
running = true;
pluginExecutor.execute(this);
}
public void stop() throws IOException {
synchronized(this) {
assert running;
assert callback != null;
running = false;
callback = null;
}
running = false;
synchronized(pollingLock) {
pollingLock.notifyAll();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment