Skip to content

Commit 4db536d

Browse files
committed
Make sure to only synchronize as long as needed
1 parent 8e0dc55 commit 4db536d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

soot-infoflow/src/soot/jimple/infoflow/util/ReusableExecutor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ public ReusableExecutor(ExecutorService executor) {
2121
}
2222

2323
public void waitUntilFinished() throws InterruptedException {
24-
25-
synchronized (obj) {
26-
while (counter.get() > 0) {
24+
while (counter.get() > 0) {
25+
synchronized (obj) {
2726
obj.wait();
2827
}
2928
}

0 commit comments

Comments
 (0)