RFR: 8254350: CompletableFuture.get may swallow InterruptedException [v2]
Daniel Fuchs
dfuchs at openjdk.java.net
Tue Dec 8 10:22:15 UTC 2020
On Tue, 8 Dec 2020 06:30:28 GMT, Martin Buchholz <martin at openjdk.org> wrote:
>> 8254350: CompletableFuture.get may swallow InterruptedException
>
> Martin Buchholz has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.
test/jdk/java/util/concurrent/CompletableFuture/LostInterrupt.java line 49:
> 47:
> 48: public static void main(String[] args) throws Exception {
> 49: ThreadLocalRandom rnd = ThreadLocalRandom.current();
Hi Martin,
Is using a `ThreadLocalRandom` important for the test logic?
I was wondering whether it would be better to use ( `* @library /test/lib`) `jdk.test.lib.RandomFactory`,
which prints the random seed in the output so that you can reproduce with the same pseudo-random
sequence in case of test failures.
best regards,
-- daniel
-------------
PR: https://git.openjdk.java.net/jdk/pull/1651
More information about the core-libs-dev
mailing list