Open
Description
As far as I understand the current revision of Using callbacks suggests that using CountDownLatch is the best approach to solve the problem.
However, the provided solution doesn't work even if one of the requests fails. When a request fails, the error is simply logged on Request3Callbacks.kt#L34. countDown() isn't called in that case. Because of that, the thread will never return from await() call.
The same goes for the second suggested solution (AtomicInteger). The counter isn't incremented if a request fails. Because of that, when all requests are completed, the counter won't be equal to the count of repositories.
I am not sure if this should be fixed or even mentioned in the docs, but I think it should be at least listed as a known issue.
Metadata
Metadata
Assignees
Labels
No labels