Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active April 13, 2018 12:45
Show Gist options
  • Save deque-blog/9a50cebec11ccc7ea85c4871bdd2eed5 to your computer and use it in GitHub Desktop.
Save deque-blog/9a50cebec11ccc7ea85c4871bdd2eed5 to your computer and use it in GitHub Desktop.
class SuggestPopularFriendPost {
private final IAccessProfileInfo profileInfo;
private final ExecutorService executor; // Where would it come from?
private Future<Iterable<ProfileId> friendsOf(ProfileId profileId) {
return executor.submit(() -> profileInfo.friendsOf(profileId));
}
// ... remaining code ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment