On Wed, 5 Feb 2025 16:14:41 GMT, Viktor Klang <vkl...@openjdk.org> wrote:

> This change is likely going to need some extra verbiage in the spec for 
> mapConcurrent, and thus a CSR.
> This behavior aligns mapConcurrent with how parallel streams work in 
> conjunction with interruptions of the caller thread.

src/java.base/share/classes/java/util/stream/Gatherers.java line 432:

> 430:                                 } catch (InterruptedException ie) {
> 431:                                     // We ignore interrupts here because 
> we cannot proceed
> 432:                                     // until all spawned threads have 
> exited

Why discard instead of keeping existing deferral? Swallowing interrupt requests 
generally breaks cancellation.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23467#discussion_r1944157403

Reply via email to