Java Thread Executor Execute execute(Runnable task)

Here you can find the source of execute(Runnable task)

Description

execute

License

Open Source License

Declaration

public static void execute(Runnable task) 

Method Source Code


//package com.java2s;
import java.util.concurrent.*;

public class Main {
    private static ExecutorService executorService;

    public static void execute(Runnable task) {
        executorService.submit(task);//from  w w w.  ja  v a  2  s . co  m
    }

    public static <T> Future<T> execute(Callable<T> task) {
        return executorService.submit(task);
    }
}

Related

  1. execute(int nThreads, List callables)
  2. execute(Runnable command)
  3. execute(Runnable command)
  4. execute(Runnable runnable)
  5. execute(Runnable task)
  6. execute(String name, Runnable runnable)
  7. executeAndWait(final Runnable r)
  8. executeAsynchronously(Runnable r)
  9. executeForever(final Runnable runnable)