From be2a92d6c29410b4e03235620141e055a97a3a59 Mon Sep 17 00:00:00 2001 From: Abraham Kiggundu Date: Wed, 7 Jan 2015 00:37:28 +0300 Subject: [PATCH] Revert lock variable rename for clarity --- .../plugins/file/PollingRemovableDriveMonitor.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/briar-desktop/src/org/briarproject/plugins/file/PollingRemovableDriveMonitor.java b/briar-desktop/src/org/briarproject/plugins/file/PollingRemovableDriveMonitor.java index 375e22d5a..4ca9e3ce6 100644 --- a/briar-desktop/src/org/briarproject/plugins/file/PollingRemovableDriveMonitor.java +++ b/briar-desktop/src/org/briarproject/plugins/file/PollingRemovableDriveMonitor.java @@ -22,8 +22,8 @@ class PollingRemovableDriveMonitor implements RemovableDriveMonitor, Runnable { private volatile boolean running = false; private volatile Callback callback = null; - private final Lock synchLock = new ReentrantLock(); - private final Condition stopPolling = synchLock.newCondition(); + private final Lock pollingLock = new ReentrantLock(); + private final Condition stopPolling = pollingLock.newCondition(); public PollingRemovableDriveMonitor(Executor ioExecutor, @@ -41,12 +41,12 @@ class PollingRemovableDriveMonitor implements RemovableDriveMonitor, Runnable { public void stop() throws IOException { running = false; - synchLock.lock(); + pollingLock.lock(); try { stopPolling.signalAll(); } finally { - synchLock.unlock(); + pollingLock.unlock(); } } @@ -54,12 +54,12 @@ class PollingRemovableDriveMonitor implements RemovableDriveMonitor, Runnable { try { Collection drives = finder.findRemovableDrives(); while(running) { - synchLock.lock(); + pollingLock.lock(); try { stopPolling.await(pollingInterval, TimeUnit.MILLISECONDS); } finally{ - synchLock.unlock(); + pollingLock.unlock(); } if(!running) return; Collection newDrives = finder.findRemovableDrives();