boolean needToCreate = false;
while (true) {
synchronized (this) {
while (!_requestPending) {
try {
wait();
} catch (InterruptedException e) {/* ignored */
}
}
needToCreate = _requestPending;
_requestPending = false;
}
if (needToCreate) {
_owner.createAndAddObject();
}
}