Skip to content
Snippets Groups Projects
Commit bbd65c67 authored by Christian Wulf's avatar Christian Wulf
Browse files

fixed concurrency bug

parent f5209b37
No related branches found
No related tags found
No related merge requests found
...@@ -53,8 +53,9 @@ public class SignalingCounter { ...@@ -53,8 +53,9 @@ public class SignalingCounter {
} }
final Object cond = conditions.get(number); final Object cond = conditions.get(number);
while (counter != number) {
synchronized (cond) { synchronized (cond) { // counter must be wrapped by synchronized to get the latest value
while (counter != number) {
cond.wait(); cond.wait();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment