You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by gi...@apache.org on 2026/03/27 05:24:48 UTC

(groovy-dev-site) branch asf-site updated: 2026/03/27 05:24:45: Generated dev website from groovy-website@089d3db

This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-dev-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 79f3ecf  2026/03/27 05:24:45: Generated dev website from groovy-website@089d3db
79f3ecf is described below

commit 79f3ecf925e32af68d0c352b1389153445a6c0d4
Author: jenkins <bu...@apache.org>
AuthorDate: Fri Mar 27 05:24:45 2026 +0000

    2026/03/27 05:24:45: Generated dev website from groovy-website@089d3db
---
 blog/feed.atom               | 11 +++++++++++
 blog/groovy-async-await.html | 25 ++++++++++++-------------
 blog/index.html              |  4 ++--
 search/search-index.json     |  4 ++--
 4 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/blog/feed.atom b/blog/feed.atom
index a6cf129..9dc7100 100644
--- a/blog/feed.atom
+++ b/blog/feed.atom
@@ -5,6 +5,17 @@
   <link href="http://groovy.apache.org/blog/feed.atom" rel="self"/>
   <id>http://groovy.apache.org/blog</id>
   <updated>2026-03-24T16:30:00Z</updated>
+  <entry>
+    <id>http://groovy.apache.org/blog/groovy-async-await</id>
+    <author>
+      <name>Paul King</name>
+    </author>
+    <title type="html">Async/await for Groovy</title>
+    <link href="http://groovy.apache.org/blog/groovy-async-await"/>
+    <updated>2026-03-24T16:30:00Z</updated>
+    <published>2026-03-24T16:30:00Z</published>
+    <summary type="html">This post looks at a proposed extension to Groovy which provides comprehensive async/await support.</summary>
+  </entry>
   <entry>
     <id>http://groovy.apache.org/blog/loop-invariants</id>
     <author>
diff --git a/blog/groovy-async-await.html b/blog/groovy-async-await.html
index 76cfb52..fd0069f 100644
--- a/blog/groovy-async-await.html
+++ b/blog/groovy-async-await.html
@@ -194,7 +194,7 @@ CompletableFuture&lt;Quest&gt; quest =
 separated from the code that causes the exception, and the control
 flow reads inside-out. For this example, the simple chaining
 is manageable, but the complexity grows non-linearly with
-branching and error handling</p>
+branching and error handling.</p>
 </div>
 </div>
 </div>
@@ -261,16 +261,15 @@ common pattern. Here&#8217;s how it looks with <code>Awaitable.all</code>:</p>
     var villain   = async { fetchVillain(visibleVillainId) }
 
     var result = await Awaitable.all(stats(), inventory(), villain())
-    var (s, inv, v) = result*.get()
+    var (s, inv, v) = result*.get()  // spread the results into variables
     return new BattleScreen(s, inv, v)
 }</code></pre>
 </div>
 </div>
 <div class="paragraph">
-<p>All three I/O calls run concurrently. The <code>all</code> combinator waits until
-all results are available. If one or more threads fail, all threads complete
-normally, and the first exception that occurred is thrown unwrapped.
-(See <code>AsyncScope</code> later in Example 6 if fail-fast semantics is appropriate.)</p>
+<p>Here, <code>async { … }</code> creates an async closure — a reusable
+block that doesn&#8217;t run until you call it.
+Invoking <code>stats()</code>, <code>inventory()</code>, and <code>villain()</code> each launches its respective block concurrently and returns an <code>Awaitable</code>. The <code>all</code> combinator produces another <code>Awaitable</code> that completes when every task has finished. If any task fails, the remaining tasks still run to completion, and the first exception is thrown unwrapped. (For fail-fast semantics — cancelling siblings as soon as one fails — see <code>AsyncScope</cod [...]
 </div>
 <div class="sect2">
 <h3 id="_how_this_compares_to_javas_structuredtaskscope">How this compares to Java&#8217;s <code>StructuredTaskScope</code></h3>
@@ -494,7 +493,8 @@ a <code>TimeoutException</code> is thrown — which you handle with an ordinary
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="prettyprint highlight"><code data-lang="groovy">var loot = await Awaitable.completeOnTimeout(raidDungeon(heroes, rooms), [], 30, SECONDS)</code></pre>
+<pre class="prettyprint highlight"><code data-lang="groovy">var boobyPrize = ['an old boot']
+var loot = await Awaitable.completeOnTimeout(raidDungeon(heroes, rooms), boobyPrize, 30, SECONDS)</code></pre>
 </div>
 </div>
 </div>
@@ -614,11 +614,10 @@ both can coexist in the same codebase.</p>
 <div class="paragraph">
 <p>The examples above are only a taste. The complete proposal also includes
 async closures and lambdas, the <code>@Async</code> annotation (for Java-style
-declarations), <code>Awaitable</code> combinators (<code>any</code>, <code>allSettled</code>, <code>delay</code>,
-<code>orTimeoutMillis</code>), <code>AsyncContext</code> for propagating trace and tenant
-metadata across thread hops, cancellation support, and a pluggable
-adapter registry for custom async types. The full spec is available in
-the
+declarations), other <code>Awaitable</code> combinators (<code>any</code>, <code>allSettled</code>, <code>delay</code>),
+more details about <code>AsyncContext</code> for propagating trace and tenant metadata across
+thread hops, cancellation support, and a pluggable adapter registry for
+custom async types. The full spec is available in the
 <a href="https://github.com/apache/groovy/blob/GROOVY-9381_3/src/spec/doc/core-async-await.adoc">draft documentation</a>.</p>
 </div>
 </div>
@@ -684,7 +683,7 @@ threads make it scale.</p>
 <p><a href="https://openjdk.org/jeps/525">JEP 525 — Structured Concurrency (Sixth Preview)</a></p>
 </li>
 <li>
-<p><a href="https://groovy-lang.org/blog/gpars-meets-virtual-threads.html">GPars meets Virtual Threads</a></p>
+<p><a href="https://groovy.apache.org/blog/gpars-meets-virtual-threads">GPars meets Virtual Threads</a></p>
 </li>
 <li>
 <p><a href="http://gpars.org/">GPars</a></p>
diff --git a/blog/index.html b/blog/index.html
index a434a88..29af555 100644
--- a/blog/index.html
+++ b/blog/index.html
@@ -59,7 +59,7 @@
                                     </ul>
                                 </div>
                             </div>
-                        </div><div id='content' class='page-1'><div class='row'><div class='row-fluid'><div class='col-lg-3' id='blog-index'><ul class='nav-sidebar list'><li class='active'><a href='/blog/'>Blogs</a></li><li><a href='loop-invariants'>Design by contract with Groovy&trade;: loop invariants</a></li><li><a href='groovy-graph-databases'>Using Graph Databases with Groovy&trade;</a></li><li><a href='fruity-eclipse-grouping'>Grouping Fruity Collections</a></li><li><a href='groovy [...]
+                        </div><div id='content' class='page-1'><div class='row'><div class='row-fluid'><div class='col-lg-3' id='blog-index'><ul class='nav-sidebar list'><li class='active'><a href='/blog/'>Blogs</a></li><li><a href='loop-invariants'>Design by contract with Groovy&trade;: loop invariants</a></li><li><a href='groovy-async-await'>Async/await for Groovy</a></li><li><a href='groovy-graph-databases'>Using Graph Databases with Groovy&trade;</a></li><li><a href='fruity-eclipse-g [...]
                             <div class='row'>
                                 <div class='colset-3-footer'>
                                     <div class='col-1'>
@@ -103,7 +103,7 @@
                     colors: am5.ColorSet.new(root, {})
                 }));
                 wc.data.setAll([
-                { category: "groovy", value: 89 }, { category: "asf", value: 2 }, { category: "apachecon", value: 3 }, { category: "communityovercode", value: 2 }, { category: "natural language processing", value: 2 }, { category: "nlp", value: 1 }, { category: "nlpcraft", value: 1 }, { category: "combinations", value: 1 }, { category: "permutations", value: 1 }, { category: "testing", value: 2 }, { category: "junit", value: 2 }, { category: "spock", value: 2 }, { category: "jqwik", valu [...]
+                { category: "groovy", value: 89 }, { category: "asf", value: 2 }, { category: "apachecon", value: 3 }, { category: "communityovercode", value: 2 }, { category: "natural language processing", value: 2 }, { category: "nlp", value: 1 }, { category: "nlpcraft", value: 1 }, { category: "combinations", value: 1 }, { category: "permutations", value: 1 }, { category: "testing", value: 2 }, { category: "junit", value: 2 }, { category: "spock", value: 2 }, { category: "jqwik", valu [...]
                 ]);
                 wc.labels.template.setAll({
                     paddingTop: 5,
diff --git a/search/search-index.json b/search/search-index.json
index e708d32..7eb2491 100644
--- a/search/search-index.json
+++ b/search/search-index.json
@@ -254,7 +254,7 @@
     {
         "id": "blog/groovy-async-await.html",
         "title": "The Apache Groovy programming language - Blogs - Async/await for Groovy",
-        "content": "The Apache Groovy programming language - Blogs - Async/await for Groovy Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy&trade; Learn Documentation Download Support Contribute Ecosystem Blog posts Socia [...]
+        "content": "The Apache Groovy programming language - Blogs - Async/await for Groovy Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy&trade; Learn Documentation Download Support Contribute Ecosystem Blog posts Socia [...]
         "url": "blog/groovy-async-await.html",
         "site": "dev"
     },
@@ -688,7 +688,7 @@
     {
         "id": "blog/index.html",
         "title": "The Apache Groovy programming language - Blogs",
-        "content": "The Apache Groovy programming language - Blogs Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy&trade; Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Blogs Design by cont [...]
+        "content": "The Apache Groovy programming language - Blogs Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on GitHub Report issues in Jira Stack Overflow questions Slack Community You are using an outdated browser. Please upgrade your browser to improve your experience. Apache Groovy&trade; Learn Documentation Download Support Contribute Ecosystem Blog posts Socialize Blogs Design by cont [...]
         "url": "blog/index.html",
         "site": "dev"
     },