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

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


The following commit(s) were added to refs/heads/asf-site by this push:
     new 3b9705e  async/await draft post (minor tweak)
3b9705e is described below

commit 3b9705eec1bb50a631215ec3c9fbd20d37b80e9e
Author: Paul King <[email protected]>
AuthorDate: Fri Mar 27 21:09:05 2026 +1000

    async/await draft post (minor tweak)
---
 site/src/site/blog/groovy-async-await.adoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/site/src/site/blog/groovy-async-await.adoc 
b/site/src/site/blog/groovy-async-await.adoc
index 17d3241..114c7e0 100644
--- a/site/src/site/blog/groovy-async-await.adoc
+++ b/site/src/site/blog/groovy-async-await.adoc
@@ -312,12 +312,12 @@ simultaneously. If any hero falls, the whole raid 
retreats.
 `AsyncScope` binds child task lifetimes to a scope — inspired by
 Kotlin's `coroutineScope`, Swift's `TaskGroup`, and Java's
 `StructuredTaskScope`. When the scope exits, all child tasks have
-completed or been cancelled:
+completed or been canceled:
 
 [source,groovy]
 ----
 async raidDungeon(List<Hero> party, List<Room> rooms) {
-    AsyncScope.withScope { scope ->
+    try(var scope = AsyncScope.create()) {
         var missions = unique(party, rooms).collect { hero, room ->
             scope.async { await hero.scout(room) }
         }

Reply via email to