All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.runtime.BlockingOperationControl Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package io.quarkus.runtime;

public class BlockingOperationControl {

    private static volatile IOThreadDetector[] ioThreadDetectors;

    public static void setIoThreadDetector(IOThreadDetector[] ioThreadDetector) {
        BlockingOperationControl.ioThreadDetectors = ioThreadDetector;
    }

    public static boolean isBlockingAllowed() {
        for (IOThreadDetector ioThreadDetector : ioThreadDetectors) {
            if (ioThreadDetector.isInIOThread()) {
                return false;
            }
        }
        return true;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy