Looks good Shanliang. The synchronization is a bit strange, with the flag being volatile and sometime modified within synchronized blocks and sometime being modified outside of any s-block, but I believe it is working (AFAIU the synchronized is mostly needed because you call notifyAll() and wait() and the fact that the flag is also modified within the block is just coincidence ;-) ). I'm OK with this.
-- daniel On 9/15/14 3:05 PM, shanliang wrote:
Hi, Please review the following fix, I changed the way to check received notifications. Bug: https://bugs.openjdk.java.net/browse/JDK-8042205 Webrec: http://cr.openjdk.java.net/~sjiang/JDK-8042205/00/ <http://cr.openjdk.java.net/%7Esjiang/JDK-8042205/00/> Thanks, shanliang