<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ron Veen on JAVAPRO International</title><link>https://javapro-en.svenruppert.com/authors/ron-veen/</link><description>Recent content in Ron Veen on JAVAPRO International</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 17 Jun 2025 07:00:02 +0000</lastBuildDate><atom:link href="https://javapro-en.svenruppert.com/authors/ron-veen/index.xml" rel="self" type="application/rss+xml"/><item><title>Modern Java</title><link>https://javapro-en.svenruppert.com/modern-java/</link><pubDate>Tue, 17 Jun 2025 07:00:02 +0000</pubDate><guid>https://javapro-en.svenruppert.com/modern-java/</guid><description>&lt;p&gt;With Java&amp;rsquo;s adoption of a six-month release cycle, new features are being introduced to the language rapidly. This article will explore the latest enhancements from Java versions 21 to 24. Our focus will be on language-specific changes, excluding updates to the JVM. Additionally, we will not cover the Foreign Functions and Memory API, which serves as a modern and safer alternative to JNI.&lt;/p&gt;
&lt;p&gt;I would categorize the changes made to the language into three groups:&lt;/p&gt;</description></item><item><title>Structured concurrency</title><link>https://javapro-en.svenruppert.com/structured-concurrency/</link><pubDate>Fri, 18 Apr 2025 07:00:03 +0000</pubDate><guid>https://javapro-en.svenruppert.com/structured-concurrency/</guid><description>&lt;p&gt;Structured Concurrency was the second delivery that came out of Project Loom. It was first introduced in Java 19 as a preview API. It aimed to simplify multithreaded programming by treating multiple tasks running in different threads as a single unit of work, thereby streamlining makes the code more readable, streamlining error handling, improving reliability, and enhancing observerability.&lt;/p&gt;
&lt;p&gt;In this article, we will look at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Look at what structured concurrency is.&lt;/li&gt;
&lt;li&gt;Look at an example using structured concurrency.&lt;/li&gt;
&lt;li&gt;Dive into the underlying API with StructuredTaskScope.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="what-is-structured-concurrency"&gt;&lt;strong&gt;What is Structured Concurrency&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Structured concurrency allows developers to reason about concurrent code by defining precise points where execution splits into multiple tasks and where those tasks subsequently merge. It brings the same level of organization to concurrency that &lt;code&gt;for&lt;/code&gt; loops and &lt;code&gt;if&lt;/code&gt; branches bring to structured programming. It achieves this by restricting the lifespan of concurrent operations to specific scopes. Similar to how variables within a &lt;code&gt;if&lt;/code&gt; statement in structured programming are bound to that block, concurrent operations within a structured scope are terminated upon exiting that scope. This ensures that threads do not linger, preventing memory leaks and wasted CPU resources.&lt;/p&gt;</description></item></channel></rss>