Java Thread Executor Execute run(Runnable target)

Here you can find the source of run(Runnable target)

Description

run

License

Open Source License

Declaration

public static void run(Runnable target) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Main {
    private static ExecutorService cachedThreadPool = Executors.newCachedThreadPool();

    public static void run(Runnable target) {
        cachedThreadPool.execute(target);
    }/*from w  ww  .  j av  a  2  s .  c om*/
}

Related

  1. executePeriodicallyInThread(Runnable r, int delay, int period, TimeUnit unit)
  2. ExecuteThreads(ArrayList threads, int nThreads)
  3. invokeAsync(Runnable runnable)
  4. invokeLater(Runnable runnable)
  5. invokeOnBackgroundThread(Runnable runnable)
  6. runConcurrently(final Runnable[] threads)
  7. runConcurrently(Runnable... tasks)
  8. runInBackground(final Runnable task)
  9. runInBackground(Runnable run)