jdk.org
Subject: Re: [External] : Re: Question about mapConcurrent() Behavior and
Happens-Before Guarantees
Thanks for pressing on that, Viktor!
I think I was fooled by my quick-and-dirty test. As I tried to harden it, I
failed to deduce consistent behavior about what parallel stream does when
Tuesday, 8 July 2025 04:26
> *To:* Viktor Klang
> *Cc:* core-libs-dev@openjdk.org
> *Subject:* [External] : Re: Question about mapConcurrent() Behavior and
> Happens-Before Guarantees
>
> Thanks for the quick reply, Viktor!
>
> On Mon, Jul 7, 2025 at 2:35 AM Viktor Klang
>
ore-libs-dev@openjdk.org
Subject: [External] : Re: Question about mapConcurrent() Behavior and
Happens-Before Guarantees
Thanks for the quick reply, Viktor!
On Mon, Jul 7, 2025 at 2:35 AM Viktor Klang
mailto:viktor.kl...@oracle.com>> wrote:
Hi Jige,
>Initially, I thought this design choice m
roup
> Oracle
> --
> *From:* core-libs-dev on behalf of Jige
> Yu
> *Sent:* Thursday, 3 July 2025 16:36
> *To:* core-libs-dev@openjdk.org
> *Subject:* Question about mapConcurrent() Behavior and Happens-Before
> Guarantees
>
>
>
a Platform Group
Oracle
From: core-libs-dev on behalf of Jige Yu
Sent: Thursday, 3 July 2025 16:36
To: core-libs-dev@openjdk.org
Subject: Question about mapConcurrent() Behavior and Happens-Before Guarantees
Hi JDK Core Devs,
I'm writing to you tod
Assuming the test code and my reading of the mapConcurrent() code haven't
misled me, I think this observation suggests that if an *upstream exception*
terminates the stream, mapConcurrent() may not be able to properly cancel
or interrupt the virtual threads it has already started. This could
potent
Yes.
I got two tests that show the behavior difference between downstream
exception and upstream exception:
@Test public void mapConcurrently_upstreamFailureDoesNotInterrupt() {
ConcurrentLinkedQueue started = new ConcurrentLinkedQueue<>();
ConcurrentLinkedQueue interrupted = new ConcurrentLin
These questions necessitate runnable examples. Do you have any
On Thu, Jul 3, 2025, 10:37 AM Jige Yu wrote:
> Hi JDK Core Devs,
>
> I'm writing to you today with a question about the behavior of
> mapConcurrent() and its interaction with unchecked exceptions. I've been
> experimenting with the A
Hi JDK Core Devs,
I'm writing to you today with a question about the behavior of
mapConcurrent() and its interaction with unchecked exceptions. I've been
experimenting with the API and observed that mapConcurrent() blocks and
joins all virtual threads upon an unchecked exception before propagating