Last active
May 29, 2016 13:44
-
-
Save HennIdan/e2ca38c917db510f4a5ac52b3e6c7071 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future <String> marvel = executor.submit(new Callable <String> () { | |
public String call() { | |
return getMarvelHeroWithCharacter(“C”); // totally not making this up | |
} | |
}); | |
// other very important stuff of course, non-blocking ftw | |
System.out.println(marvel.get()); // this bit is blocking if the result isn’t ready yet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment