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