add finally block
This commit is contained in:
parent
a5dd2f43e0
commit
7b63b65be3
|
@ -45,10 +45,11 @@ class WorkQueue {
|
|||
} catch (NoSuchElementException e) {
|
||||
System.out.println("!!! No taks in queue (BUT STILL TRIED ACCESSING)");
|
||||
return;
|
||||
} finally {
|
||||
generalAccessSemaphore.release();
|
||||
}
|
||||
|
||||
writeSemaphore.release();
|
||||
generalAccessSemaphore.release();
|
||||
|
||||
t.run();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue