quarkiverse / quarkus-unleash

Unleash is a open source feature flag & toggle system
https://github.com/Unleash/unleash
Apache License 2.0
17 stars 9 forks source link

Use an executor from Quarkus rather than the default one from the Unleash client #228

Closed gwenneg closed 7 months ago

gwenneg commented 8 months ago

The Unleash client is currently initialized without passing an executor to the builder: https://github.com/quarkiverse/quarkus-unleash/blob/28f2bc18dd3f9192ff45158ce2a1e739a8277db0/runtime/src/main/java/io/quarkiverse/unleash/runtime/UnleashCreator.java#L10-L12

By default, Unleash will rely on a default static executor:

public static synchronized UnleashScheduledExecutorImpl getInstance() {
    if (INSTANCE == null) {
        INSTANCE = new UnleashScheduledExecutorImpl();
    }
    return INSTANCE;
}

We should probably replace it with an executor managed by Quarkus, if possible.