package io.quarkus.mutiny.deployment;

import java.util.concurrent.ExecutorService;

import io.quarkus.deployment.Feature;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.ExecutorBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.mutiny.runtime.MutinyInfrastructure;

public class MutinyProcessor {

    @BuildStep
    public FeatureBuildItem registerFeature() {
        return new FeatureBuildItem(Feature.MUTINY);
    }

    @BuildStep
    @Record(ExecutionTime.RUNTIME_INIT)
    public void initExecutor(ExecutorBuildItem executorBuildItem, MutinyInfrastructure recorder) {
        ExecutorService executor = executorBuildItem.getExecutorProxy();
        recorder.configureMutinyInfrastructure(executor);
    }

    @BuildStep
    @Record(ExecutionTime.RUNTIME_INIT)
    public void defineDroppedExceptionHandler(MutinyInfrastructure recorder) {
        recorder.configureDroppedExceptionHandler();
    }

    @BuildStep
    @Record(ExecutionTime.RUNTIME_INIT)
    public void defineThreadBlockingChecker(MutinyInfrastructure recorder) {
        recorder.configureThreadBlockingChecker();
    }
}

@@ -924,39 +924,38 @@
 d(ExecutionTime.
-RUNTIME
+STATIC
 _INIT)%0A    publi
@@ -1117,39 +1117,38 @@
 d(ExecutionTime.
-RUNTIME
+STATIC
 _INIT)%0A    publi

Move Mutiny infrastructure initialization to STATIC_INIT