From 43e41597a96945682b39b9e819f515285275f176 Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Tue, 14 May 2024 14:09:44 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Martin Kouba --- docs/src/main/asciidoc/cdi-reference.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/main/asciidoc/cdi-reference.adoc b/docs/src/main/asciidoc/cdi-reference.adoc index 2257c1ebbfdff..55b35acfeff50 100644 --- a/docs/src/main/asciidoc/cdi-reference.adoc +++ b/docs/src/main/asciidoc/cdi-reference.adoc @@ -1070,7 +1070,7 @@ public class NoopAsyncObserverExceptionHandler implements AsyncObserverException ---- [[reactive_pitfalls]] -== CDI Pitfalls with Reactive Programming +== Pitfalls with Reactive Programming CDI is a purely synchronous framework. Its notion of asynchrony is very limited and based solely on thread pools and thread offloading. @@ -1078,7 +1078,7 @@ Therefore, there is a number of pitfalls when using CDI together with reactive p === Detecting When Blocking Is Allowed -The `BlockingOperationControl.isBlockingAllowed()` method allows detecting when blocking is allowed. +The `io.quarkus.runtime.BlockingOperationControl#isBlockingAllowed()` method can be used to detect whether blocking is allowed on the current thread. When it is not, and you need to perform a blocking operation, you have to offload it to another thread. The easiest way is to use the `Vertx.executeBlocking()` method: