Java Thread Executor Execute runInBackground(final Runnable task)

Here you can find the source of runInBackground(final Runnable task)

Description

run In Background

License

Apache License

Declaration

public static void runInBackground(final Runnable task) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

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

public class Main {
    public static void runInBackground(final Runnable task) {
        final ExecutorService executor = Executors.newSingleThreadExecutor();
        executor.submit(task);/* w  w w  . j  a  v  a 2  s.c o  m*/

    }
}

Related

  1. invokeLater(Runnable runnable)
  2. invokeOnBackgroundThread(Runnable runnable)
  3. run(Runnable target)
  4. runConcurrently(final Runnable[] threads)
  5. runConcurrently(Runnable... tasks)
  6. runInBackground(Runnable run)
  7. runInNewThread(Runnable task)
  8. runOnUI(Runnable runnable)
  9. runWithTimeout(final Runnable runnable, long timeout, TimeUnit timeUnit)