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
@@ -156,7 +156,7 @@ a list of user ids in one call.
//
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

@@ -124,7 +124,7 @@ In the example above, the first call to dispatch will cause the batched user key
Since each `thenAccept` callback made more calls to `userLoader` to get the "user they have invited", another 2 user keys are given at the `BatchLoader`
function for them.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants