Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.