Repository: quarkusio/quarkus
Issue: Improper shutdown exception

Upon quarkus:dev mode shutdown via CTRL+C, I receive the following error

```
mvn compile quarkus:dev
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< org.issue_2482:reproducer >----------------------
[INFO] Building reproducer 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ reproducer ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ reproducer ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- quarkus-maven-plugin:999-SNAPSHOT:dev (default-cli) @ reproducer ---
Listening for transport dt_socket at address: 5005
2019-06-05 11:16:10,209 INFO  [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation
2019-06-05 11:16:10,982 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 773ms
2019-06-05 11:16:11,298 INFO  [io.qua.swa.run.SwaggerUiServletExtension] (main) Swagger UI available at /swagger-ui
2019-06-05 11:16:11,993 INFO  [io.quarkus] (main) Quarkus 999-SNAPSHOT started in 1.927s. Listening on: http://[::]:8080
2019-06-05 11:16:11,995 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, narayana-jta, resteasy, resteasy-jsonb, smallrye-openapi, swagger-ui]
^C2019-06-05 11:16:25,986 ERROR [io.qua.run.StartupContext] (Quarkus Shutdown Thread) Running a shutdown task failed: java.util.concurrent.RejectedExecutionException
        at org.jboss.threads.RejectingExecutor.execute(RejectingExecutor.java:38)
        at org.jboss.threads.EnhancedQueueExecutor.rejectShutdown(EnhancedQueueExecutor.java:2055)
        at org.jboss.threads.EnhancedQueueExecutor.execute(EnhancedQueueExecutor.java:765)
        at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
        at io.quarkus.runtime.CleanableExecutor.submit(CleanableExecutor.java:122)
        at io.quarkus.runtime.CleanableExecutor.clean(CleanableExecutor.java:67)
        at io.quarkus.runtime.ExecutorTemplate$1.run(ExecutorTemplate.java:63)
        at io.quarkus.runtime.StartupContext.close(StartupContext.java:59)
        at io.quarkus.runner.ApplicationImpl1.doStop(Unknown Source)
        at io.quarkus.runtime.Application.stop(Application.java:167)
        at io.quarkus.runner.RuntimeRunner$1.close(RuntimeRunner.java:138)
        at io.quarkus.runner.RuntimeRunner.close(RuntimeRunner.java:84)
        at io.quarkus.dev.DevModeMain$1.run(DevModeMain.java:113)
        at java.lang.Thread.run(Thread.java:748)
        Suppressed: java.util.concurrent.RejectedExecutionException: Executor is being shut down
                at org.jboss.threads.EnhancedQueueExecutor.rejectShutdown(EnhancedQueueExecutor.java:2057)
                ... 12 more

2019-06-05 11:16:25,991 INFO  [io.quarkus] (Quarkus Shutdown Thread) Quarkus stopped in 0.009s
```

The app uses the extensions mentioned in the log and connect to H2 server.

```
quarkus.datasource.url=jdbc:h2:tcp://localhost/~/Downloads/nobackup/test
quarkus.datasource.driver=org.h2.Driver
quarkus.datasource.username=sa
quarkus.datasource.password=

quarkus.hibernate-orm.database.generation=update
```

Changed files:
core/runtime/src/main/java/io/quarkus/runtime/CleanableExecutor.java

diff --git a/core/runtime/src/main/java/io/quarkus/runtime/CleanableExecutor.java b/core/runtime/src/main/java/io/quarkus/runtime/CleanableExecutor.java
index b5d5db18aef..8857bf9da43 100644
--- a/core/runtime/src/main/java/io/quarkus/runtime/CleanableExecutor.java
+++ b/core/runtime/src/main/java/io/quarkus/runtime/CleanableExecutor.java
@@ -11,6 +11,7 @@
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
+import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -63,8 +64,14 @@ public void run() {
         //threadlocal state. It does not really matter if this does not work, however if these threads are holding
         //state that is stopping things being GC'ed it can help with memory usage
         try {
-            for (int i = 0; i < executor.getMaximumPoolSize(); ++i) {
-                submit(empty);
+            if (!executor.isShutdown()) {
+                for (int i = 0; i < executor.getMaximumPoolSize(); ++i) {
+                    try {
+                        submit(empty);
+                    } catch (RejectedExecutionException e) {
+                        //ignore
+                    }
+                }
             }
         } finally {
             latch.countDown();