Concurrent Operations

The following table provides additional information on the members of this template class.
Member Description
reference local()

If there is no current element corresponding to the current thread, then this method constructs a new element. A new element is copy-constructed if an exemplar was provided to the constructor for *this, otherwise a new element is default constructed.

Returns: A reference to the element of *this that corresponds to the current thread.

reference local( bool& exists )

Similar to local(), except that exists is set to true if an element was already present for the current thread; false otherwise.

Returns: Reference to thread-local element.

size_type size() const

Returns: The number of elements in *this. The value is equal to the number of distinct threads that have called local() after *this was constructed or most recently cleared.

bool empty() const

Returns: size()==0