Added comments.

This commit is contained in:
nathan 2015-07-22 10:02:44 +02:00
parent 92177592d6
commit ebfcf9db7a
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ class UnsafeObjectPool<T> implements ObjectPool<T> {
boolean waiting = objects.peek() == null;
// This could potentially happen due to optimistic calculations by the implementation queue.
// From my observations, 1 retry was all that was needed.
if (!objects.offer(object)) {
int limit = FULL_RETRY_LIMIT;
while (!objects.offer(object) && limit-- > 0) {