Copilot commented on code in PR #2324:
URL: https://github.com/apache/groovy/pull/2324#discussion_r2463865864


##########
src/main/java/groovy/util/concurrent/async/Awaitable.java:
##########
@@ -0,0 +1,35 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package groovy.util.concurrent.async;
+
+/**
+ * Represents a result of an asynchronous computation
+ *
+ * @since 6.0.0
+ */
+public interface Awaitable<T> {
+    /**
+     * Waits if necessary for the computation to complete, and then retrieves 
its
+     * result.
+     *
+     * @return the computed result
+     * @throws AwaitException if the computation was cancelled or completed

Review Comment:
   The documentation for the `await()` method's exception is incomplete. It 
should state 'if the computation was cancelled or completed **exceptionally**' 
to clarify that exceptions are thrown on error conditions, not successful 
completion.
   ```suggestion
        * @throws AwaitException if the computation was cancelled or completed 
exceptionally
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to