Represents an ID of a thread local object. Initially set to the maximum uint. This representation allows us to avoid a branch in accessing TLS data (because if you test capacity > id if id = maxint then the test will always fail). It allows us to keep a constexpr constructor and avoid SIOF.
Synopsis
Declared in <folly/detail/ThreadLocalDetail.h>
class EntryID;
Member Functions
Name |
Description |
|
Constructors |
Assignment operators |
|
Returns the current id, allocating one if needed. |
|
Returns the current id without allocating. |