PMDK C++ bindings  1.10.1
This is the C++ bindings documentation for PMDK's libpmemobj.
Public Member Functions | List of all members
pmem::detail::id_manager Struct Reference

This structure is used for assigning unique thread ids so that those ids will be reused in case of thread exit. More...

#include <libpmemobj++/detail/enumerable_thread_specific.hpp>

Public Member Functions

size_t get ()
 Obtain unique thread id. More...
 
void release (size_t id)
 Releases thread id so that it can be reused by other threads. More...
 

Detailed Description

This structure is used for assigning unique thread ids so that those ids will be reused in case of thread exit.

Ids will be between 0 and N where N is max number of threads.

Member Function Documentation

◆ get()

size_t pmem::detail::id_manager::get ( )
inline

Obtain unique thread id.

Precondition
this method must be called under a lock.

◆ release()

void pmem::detail::id_manager::release ( size_t  id)
inline

Releases thread id so that it can be reused by other threads.

Precondition
this method must be called under a lock.

The documentation for this struct was generated from the following file: