Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid wrapping scheduled executors #955

Merged
merged 1 commit into from
Jun 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static void setDefaultExecutor(Executor s) {
DEFAULT_SCHEDULER.shutdownNow();
}
DEFAULT_EXECUTOR = s;
DEFAULT_SCHEDULER = new MutinyScheduler(s);
DEFAULT_SCHEDULER = (s instanceof ScheduledExecutorService) ? (ScheduledExecutorService) s : new MutinyScheduler(s);
}

public static ScheduledExecutorService getDefaultWorkerPool() {
Expand Down Expand Up @@ -286,7 +286,7 @@ public static boolean canCallerThreadBeBlocked() {

/**
* Defines a custom dropped exception handler.
*
*
* @param handler the handler, must not be {@code null} and must not throw an exception or it will also be lost.
*/
public static void setDroppedExceptionHandler(Consumer<Throwable> handler) {
Expand Down Expand Up @@ -361,7 +361,7 @@ public static <T> Predicate<T> decorate(Predicate<T> predicate) {

/**
* Log from an operator.
*
* <p>
* This method should never be called directly but only from {@link Multi#log(String)} and {@link Uni#log(String)}.
*
* @param identifier the event identifier
Expand All @@ -375,7 +375,7 @@ public static void logFromOperator(String identifier, String event, Object value

/**
* Defines operator logging behavior for {@link Multi#log(String)} and {@link Uni#log(String)}.
*
*
* @param operatorLogger the new operator logger
*/
public static void setOperatorLogger(OperatorLogger operatorLogger) {
Expand All @@ -395,7 +395,7 @@ public interface OperatorLogger {

/**
* Actual logging behavior.
*
*
* @param identifier the event identifier
* @param event the event as a string
* @param value the value, if any or {@code null}
Expand Down