BloombergLP::bdlcc::SharedObjectPool::reserveCapacity

Create enough objects to satisfy at least growBy future requests.

Synopsis

Declared in <bdlcc_sharedobjectpool.h>

void
reserveCapacity(int growBy);

Description

Create enough objects to satisfy requests for at least the specified growBy objects before the next replenishment. The behavior is undefined unless 0 <= growBy. Note that this method is different from increaseCapacity in that the number of created objects may be less than growBy.

Parameters

NameDescription
growByminimum number of objects to reserve capacity for