< prev index next >
test/jdk/java/util/concurrent/tck/RecursiveTaskTest.java
Print this page
8211283: Miscellaneous changes imported from jsr166 CVS 2018-11
Reviewed-by: martin, chegar
*** 223,233 ****
int n = number;
if (n <= 1)
return n;
FibTask f1 = new FibTask(n - 1);
f1.fork();
! return (new FibTask(n - 2)).compute() + f1.join();
}
public void publicSetRawResult(Integer result) {
setRawResult(result);
}
--- 223,233 ----
int n = number;
if (n <= 1)
return n;
FibTask f1 = new FibTask(n - 1);
f1.fork();
! return new FibTask(n - 2).compute() + f1.join();
}
public void publicSetRawResult(Integer result) {
setRawResult(result);
}
*** 242,252 ****
int n = number;
if (n <= 1)
throw new FJException();
FailingFibTask f1 = new FailingFibTask(n - 1);
f1.fork();
! return (new FibTask(n - 2)).compute() + f1.join();
}
}
/**
* invoke returns value when task completes normally.
--- 242,252 ----
int n = number;
if (n <= 1)
throw new FJException();
FailingFibTask f1 = new FailingFibTask(n - 1);
f1.fork();
! return new FibTask(n - 2).compute() + f1.join();
}
}
/**
* invoke returns value when task completes normally.
< prev index next >