-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
24, 25
-
None
Currently Gatherers.mapConcurrent does not throw an InterruptedException if the thread evaluating the stream gets interrupted. This is due to Streams not supporting checked exceptions.
It seems possible to examine how parallel Streams behave under similar circumstances and adopt a similar approach to dealing with the situation.
It will be important to make sure that all spawned Virtual Threads executing tasks are also interrupted and that mapConcurrent still wait for all of them to join before the exception is propagated.
This strategy should enable supporting async interruption of Streams using Gatherer.mapConcurrent either in sequential or parallel modes.
It seems possible to examine how parallel Streams behave under similar circumstances and adopt a similar approach to dealing with the situation.
It will be important to make sure that all spawned Virtual Threads executing tasks are also interrupted and that mapConcurrent still wait for all of them to join before the exception is propagated.
This strategy should enable supporting async interruption of Streams using Gatherer.mapConcurrent either in sequential or parallel modes.
- links to
-
Review(master) openjdk/jdk/23467