Share via


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
);

Parameters

  • _N
    The number of elements to reserve space for.

Remarks

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.

Requirements

Header: concurrent_vector.h

Namespace: concurrency

See Also

Reference

concurrent_vector Class