while (true) {
Object objectToReturn;
while (0 == _objectsToReturn.size()) {
synchronized (_objectsToReturn) {
try {
_objectsToReturn.wait();
} catch (InterruptedException e) {
}
}
}
int lastIndex = _objectsToReturn.size() - 1;
objectToReturn = _objectsToReturn.remove(lastIndex);
_owner.returnObjectToPool(objectToReturn);
}