Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import com.google.common.util.concurrent.MoreExecutors;

import java.util.concurrent.*;

public class Main {

    public static boolean gracefulShutdown(ExecutorService threadPool, int shutdownTimeoutMills) {
        if (threadPool == null) {
            return true;
        }
        return MoreExecutors.shutdownAndAwaitTermination(threadPool, shutdownTimeoutMills, TimeUnit.MILLISECONDS);
    }
}