Skip to content

Conversation

@joozik
Copy link

@joozik joozik commented Nov 17, 2020

I've spotted small misspelling in readme

I've spotted small misspelling in readme
return userIds.stream()
.map(id -> userManager.loadUserById(id))
.collect(Collectors.toList());
.collect(Collectors.toList
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this is now incorrect


In this case the `userLoader.dispatchAndJoin()` is used to make a dispatch call, wait for it (aka join it), see if the data loader has more batched entries, (which is does)
In this case the `userLoader.dispatchAndJoin()` is used to make a dispatch call, wait for it (aka join it), see if the data loader has more batched entries, (which it does)
and then it repeats this until the data loader internal queue of keys is empty. At this point we have made 2 batched calls instead of the naive 4 calls we might have made if
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@joozik joozik closed this Nov 23, 2020
@joozik
Copy link
Author

joozik commented Nov 23, 2020

messed up branch

@joozik joozik deleted the joozik-patch-misspelling-in-readme-1 branch November 23, 2020 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants