mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
Moved the waitTillReady to before the doOperation call in order to have the threads synchronized.
This commit is contained in:
parent
3fdf29a670
commit
9809898470
@ -14,8 +14,8 @@ public class AtomicIntegerTest {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
doOperation();
|
||||
waitTillReady();
|
||||
doOperation();
|
||||
} finally {
|
||||
synchronized (threadDoneCount) {
|
||||
threadDoneCount.incrementAndGet();
|
||||
|
@ -14,8 +14,8 @@ public class AtomicLongTest {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
doOperation();
|
||||
waitTillReady();
|
||||
doOperation();
|
||||
} finally {
|
||||
synchronized (threadDoneCount) {
|
||||
threadDoneCount.incrementAndGet();
|
||||
|
@ -14,8 +14,8 @@ public class AtomicReferenceTest {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
doOperation();
|
||||
waitTillReady();
|
||||
doOperation();
|
||||
} finally {
|
||||
synchronized (threadDoneCount) {
|
||||
threadDoneCount.incrementAndGet();
|
||||
|
Loading…
Reference in New Issue
Block a user