Comments on: Structured Concurrency in Java with StructuredTaskScope https://www.happycoders.eu/java/structured-concurrency-structuredtaskscope/ Wed, 04 Dec 2024 21:22:26 +0000 hourly 1 By: Sven Woltmann https://www.happycoders.eu/java/structured-concurrency-structuredtaskscope/#comment-18589 Thu, 13 Jul 2023 09:13:49 +0000 https://www.happycoders.eu/?p=34150#comment-18589 In reply to Metaverse.

To emulate the StructuredTaskScope behaviour in Java 11, you could copy the source code from https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java and adjust it for Java 11.

For example, you have to change the thread factory to return platform threads instead of virtual threads (which did not yet exist in Java 11).

]]>
By: Metaverse https://www.happycoders.eu/java/structured-concurrency-structuredtaskscope/#comment-18588 Thu, 13 Jul 2023 07:45:54 +0000 https://www.happycoders.eu/?p=34150#comment-18588 Thanks for the article. I had a question, what if we had to so the same streamline handling with Java 11? What would be the proposed approach.

]]>