Permalink
Browse files

Moved the waitTillReady to before the doOperation call in order to ha…

…ve the threads synchronized.
  • Loading branch information...
1 parent 3fdf29a commit 98098984705fb4edd9e0b113e7d1acb97698430a Mike Jensen committed Jan 3, 2014
Showing with 3 additions and 3 deletions.
  1. +1 −1 test/AtomicIntegerTest.java
  2. +1 −1 test/AtomicLongTest.java
  3. +1 −1 test/AtomicReferenceTest.java
@@ -14,8 +14,8 @@ private static void runTest(final boolean increment,
@Override
public void run() {
try {
- doOperation();
waitTillReady();
+ doOperation();
} finally {
synchronized (threadDoneCount) {
threadDoneCount.incrementAndGet();
View
@@ -14,8 +14,8 @@ private static void runTest(final boolean increment,
@Override
public void run() {
try {
- doOperation();
waitTillReady();
+ doOperation();
} finally {
synchronized (threadDoneCount) {
threadDoneCount.incrementAndGet();
@@ -14,8 +14,8 @@ private static void runTest(final int threadCount,
@Override
public void run() {
try {
- doOperation();
waitTillReady();
+ doOperation();
} finally {
synchronized (threadDoneCount) {
threadDoneCount.incrementAndGet();

0 comments on commit 9809898

Please sign in to comment.