xiaoHoly commented on pull request #14076: URL: https://github.com/apache/flink/pull/14076#issuecomment-731061272
To facilitate the discussion, I will post the code below: method of Thead A! public void await() throws InterruptedException { synchronized (lock) { while (!triggered) { Thread thread = Thread.currentThread(); try { waitersSet.add(thread); lock.wait(); } finally { waitersSet.remove(thread); } } } } method of Thead B! public void trigger() { synchronized (lock) { triggered = true; lock.notifyAll(); } } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org