On Jan 9, 2014, at 10:52 AM, Tristan Yan <tristan....@oracle.com> wrote:
> Can someone else give a second review on this. In a comment the bug you state: "here total_turns_taken is a static variable, it could affect by other tests" I don't quite know under what test circumstances that can happen, but if so is the following also an issue: 52 private final static TurnChecker turn = new TurnChecker(-1); ? FWIW an alternative to using an AtomicInteger would be for the main loop to sum up thread_turns of each Context, since read/writes are all performed in a synchronized block. Paul.