Skip to content

Instantly share code, notes, and snippets.

@mjedynak
Created January 28, 2012 15:07
ExecutorService executor = Executors.newFixedThreadPool(2);
Runnable runnable = new Runnable() {
@Override
public void run() {
System.out.println(Thread.currentThread().getName());
}
};
executor.execute(runnable);
executor.execute(runnable);
executor.shutdown();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment