Disabled async stacktraces temporarily
This commit is contained in:
parent
a6b9037507
commit
816e9db448
@ -5,8 +5,15 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
|
|
||||||
public class AsyncStackTraceExecutorServiceDecorator extends SimplerExecutorServiceDecorator {
|
public class AsyncStackTraceExecutorServiceDecorator extends SimplerExecutorServiceDecorator {
|
||||||
|
|
||||||
|
// todo: Fix async stacktrace performance and memory problems
|
||||||
|
private static final boolean DISABLE_ASYNC_STACKTRACES_GLOBALLY = true;
|
||||||
|
|
||||||
public AsyncStackTraceExecutorServiceDecorator(ExecutorService executorService) {
|
public AsyncStackTraceExecutorServiceDecorator(ExecutorService executorService) {
|
||||||
super(executorService, (executor) -> {
|
super(executorService, (executor) -> {
|
||||||
|
if (DISABLE_ASYNC_STACKTRACES_GLOBALLY) {
|
||||||
|
return executor;
|
||||||
|
}
|
||||||
|
|
||||||
// Do nothing if it has already the asyncstacktrace executor service decorator
|
// Do nothing if it has already the asyncstacktrace executor service decorator
|
||||||
if (executorService instanceof ExecutorServiceDecorator) {
|
if (executorService instanceof ExecutorServiceDecorator) {
|
||||||
var decorators = ((ExecutorServiceDecorator) executorService).getExecutorServiceDecorators();
|
var decorators = ((ExecutorServiceDecorator) executorService).getExecutorServiceDecorators();
|
||||||
|
@ -14,10 +14,10 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
|
|
||||||
public abstract class SimplerExecutorServiceDecorator extends ExecutorServiceDecorator {
|
public abstract class SimplerExecutorServiceDecorator extends ExecutorServiceDecorator {
|
||||||
|
|
||||||
private final ExecutorDecorator executorDecorator;
|
private final Executor executorDecorator;
|
||||||
|
|
||||||
public SimplerExecutorServiceDecorator(ExecutorService executorService,
|
public SimplerExecutorServiceDecorator(ExecutorService executorService,
|
||||||
Function<Executor, ExecutorDecorator> executorDecoratorInitializer) {
|
Function<Executor, Executor> executorDecoratorInitializer) {
|
||||||
super(executorService);
|
super(executorService);
|
||||||
this.executorDecorator = executorDecoratorInitializer.apply(executorService);
|
this.executorDecorator = executorDecoratorInitializer.apply(executorService);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user