add finally block

This commit is contained in:
Luca Conte 2025-04-20 00:27:05 +02:00
parent a5dd2f43e0
commit 7b63b65be3
1 changed files with 2 additions and 1 deletions

View File

@ -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();
}