Skip to content

Instantly share code, notes, and snippets.

@NitinRanjan
Created July 21, 2018 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NitinRanjan/72f14de51d1b340f32dbd27e02f30cc5 to your computer and use it in GitHub Desktop.
Save NitinRanjan/72f14de51d1b340f32dbd27e02f30cc5 to your computer and use it in GitHub Desktop.
Callable example
package service;
import java.util.concurrent.Callable;
public class CallableService implements Callable{
@Override
public String call() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return Thread.currentThread().getName();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment