es.iti.wakamiti.lsp.FutureUtil Maven / Gradle / Ivy
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package es.iti.wakamiti.lsp;
import java.util.concurrent.*;
import java.util.function.*;
import es.iti.wakamiti.api.util.ThrowableFunction;
import org.eclipse.lsp4j.jsonrpc.CompletableFutures;
import org.slf4j.*;
public final class FutureUtil {
private static final Logger LOGGER = LoggerFactory.getLogger(FutureUtil.class);
private static Executor executor = Executors.newCachedThreadPool();
public interface ThrowableRunnable {
void run() throws Exception;
}
private FutureUtil() { }
public static CompletableFuture