You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: