Repository: quarkusio/quarkus
Issue: Check whether or not a thread is already blocking before submiting tasks to Quarkus executor

**Describe the bug**
When a Vert.x route is already executing blocking code, some extensions that use Quarkus executor (e.g.: `quarkus-resteasy`) dispatch tasks without checking whether or not the thread is already blocking.

**Expected behavior**
When not running in the event loop, the Quarkus executor (and extensions) should just execute code without starting a new worker thread.

**Actual behavior**
Quarkus executor (and extensions) is starting new worker threads to execute code that is already blocking.


**To Reproduce**
Steps to reproduce the behavior:
1. Create a Vert.x `io.quarkus.vertx.http.runtime.filters.Filter` and make this filter execute the next handler as blocking (e.g.: `context.vertx().executeBlocking`)
2. Create a JAX-RS resource
3. Send a request to the JAX-Resource and check that the current thread is a worker thread from Quarkus executor and not a Vert.x worker thread

**Environment (please complete the following information):**
 - Quarkus version or git rev: 999-SNAPSHOT

Changed files:
extensions/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxRequestHandler.java

diff --git a/extensions/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxRequestHandler.java b/extensions/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxRequestHandler.java
index 5c4fbc9ce6b..6f3b6ffd96e 100644
--- a/extensions/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxRequestHandler.java
+++ b/extensions/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxRequestHandler.java
@@ -19,6 +19,7 @@
 
 import io.quarkus.arc.ManagedContext;
 import io.quarkus.arc.runtime.BeanContainer;
+import io.quarkus.runtime.BlockingOperationControl;
 import io.quarkus.security.identity.CurrentIdentityAssociation;
 import io.quarkus.vertx.http.runtime.CurrentVertxRequest;
 import io.quarkus.vertx.http.runtime.VertxInputStream;
@@ -79,17 +80,25 @@ public void handle(RoutingContext request) {
             request.fail(e);
             return;
         }
-
-        executor.execute(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    dispatch(request, is, new VertxBlockingOutput(request.request()));
-                } catch (Throwable e) {
-                    request.fail(e);
-                }
+        if (BlockingOperationControl.isBlockingAllowed()) {
+            try {
+                dispatch(request, is, new VertxBlockingOutput(request.request()));
+            } catch (Throwable e) {
+                request.fail(e);
             }
-        });
+        } else {
+            executor.execute(new Runnable() {
+                @Override
+                public void run() {
+                    try {
+                        dispatch(request, is, new VertxBlockingOutput(request.request()));
+                    } catch (Throwable e) {
+                        request.fail(e);
+                    }
+                }
+            });
+        }
+
     }
 
     private void dispatch(RoutingContext routingContext, InputStream is, VertxOutput output) {