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 70302cd add @Parallel
70302cd is described below
commit 70302cd1e6530834fa8a49fa0aee0691581c52fb
Author: Paul King <[email protected]>
AuthorDate: Wed Apr 15 22:03:06 2026 +1000
add @Parallel
---
site/src/site/wiki/GEP-18.adoc | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/site/src/site/wiki/GEP-18.adoc b/site/src/site/wiki/GEP-18.adoc
index c8070cc..2a1e817 100644
--- a/site/src/site/wiki/GEP-18.adoc
+++ b/site/src/site/wiki/GEP-18.adoc
@@ -159,6 +159,18 @@ ParallelScope.withPool(Pool.cpu()) { scope ->
}
----
+The `@Parallel` annotation provides a convenient shorthand for
+parallel `for` loops with structured completion:
+
+[source,groovy]
+----
+@Parallel
+for (item in bigList) {
+ process(item)
+}
+// All iterations complete before this line
+----
+
=== Agent
`Agent` provides thread-safe mutable state through serialised update