Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

concurrent_vector::reserve Method

Allocates enough space to grow the concurrent vector to size _N without having to allocate more memory later. This method is not concurrency-safe.

void reserve(
   size_type _N
);

_N

The number of elements to reserve space for.

reserve is not concurrency-safe. You must ensure that no other threads are invoking methods on the concurrent vector when you call this method. The capacity of the concurrent vector after the method returns may be bigger than the requested reservation.

Header: concurrent_vector.h

Namespace: concurrency

Show:
© 2015 Microsoft