From 979f2d225066b04cdc5248c7cbdb2d92f21f3c3f Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Mon, 2 Oct 2023 09:38:33 +0200 Subject: [PATCH 1/2] improve timeout reference documentation --- doc/modules/ROOT/pages/reference/timeout.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/modules/ROOT/pages/reference/timeout.adoc b/doc/modules/ROOT/pages/reference/timeout.adoc index 7211f866..2d884e11 100644 --- a/doc/modules/ROOT/pages/reference/timeout.adoc +++ b/doc/modules/ROOT/pages/reference/timeout.adoc @@ -7,9 +7,12 @@ For introduction, see xref:howto/timeout.adoc[How to Watch for Timeouts]. If a guarded method takes too long, the caller will get a `TimeoutException`. If the gaurded method is not `@Asynchronous` or `@AsynchronousNonBlocking`, the thread executing the method is interrupted. -Note that interruption requires cooperation from the executing code. +Note that interruption requires cooperation from the executing code (for example, it must not swallow `InterruptedException`). In other words, it is not guaranteed that interrupting the method will actually make it stop. +If the gaurded method is `@Asynchronous` or `@AsynchronousNonBlocking`, timeout is always signalled correctly, but there is no cancellation. +Even after timeout, the asynchronous action will keep running; its eventual result is just ignored. + [[interactions]] == Interactions with Other Strategies From 073d19062f790fced30112b5ec75abcba4a453df Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Mon, 2 Oct 2023 09:44:56 +0200 Subject: [PATCH 2/2] clarify javadoc of @AsynchronousNonBlocking --- .../io/smallrye/faulttolerance/api/AsynchronousNonBlocking.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/io/smallrye/faulttolerance/api/AsynchronousNonBlocking.java b/api/src/main/java/io/smallrye/faulttolerance/api/AsynchronousNonBlocking.java index 72f6715a..a422c7dc 100644 --- a/api/src/main/java/io/smallrye/faulttolerance/api/AsynchronousNonBlocking.java +++ b/api/src/main/java/io/smallrye/faulttolerance/api/AsynchronousNonBlocking.java @@ -14,7 +14,7 @@ /** * Alternative to MicroProfile Fault Tolerance's {@link org.eclipse.microprofile.faulttolerance.Asynchronous @Asynchronous} * for guarding non-blocking asynchronous methods (executed on the original thread). It may only be present on methods - * that declare return type of {@link java.util.concurrent.CompletionStage CompletionStage}. Otherwise, it has the same + * that declare return type of {@link java.util.concurrent.CompletionStage CompletionStage}. Other than that, it has the same * meaning as MicroProfile Fault Tolerance's {@link org.eclipse.microprofile.faulttolerance.Asynchronous @Asynchronous}. * More specifically: *