ExecutorService (@NotNull @NonNls String name, @NotNull Executor backendExecutor, int maxThreads, @NotNull Disposable parentDisposable) { BoundedTaskExecutor executor = new BoundedTaskExecutor(name, backendExecutor, maxThreads, true); Disposer.register(parentDisposable, () -> executor.shutdownNow()); return executor; }