Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ThreadPrivateStorage Class Reference

Container for thread-private values. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/concurrency/arccore/concurrency/ThreadPrivate.h>

Collaboration diagram for Arcane::ThreadPrivateStorage:

Public Member Functions

void initialize ()
 Initializes the key containing thread-private values. This method can be called multiple times and does nothing if the key has already been initialized.
void * getValue ()
void setValue (void *v)

Private Attributes

GlibPrivatem_storage

Detailed Description

Container for thread-private values.

initialize() must be called before using the setValue()/getValue() methods. This initialize() method can be called multiple times.

Deprecated
Use 'thread_local' from C++11.

Definition at line 40 of file ThreadPrivate.h.

Constructor & Destructor Documentation

◆ ThreadPrivateStorage()

Arcane::ThreadPrivateStorage::ThreadPrivateStorage ( )

Definition at line 25 of file ThreadPrivate.cc.

◆ ~ThreadPrivateStorage()

Arcane::ThreadPrivateStorage::~ThreadPrivateStorage ( )

Definition at line 31 of file ThreadPrivate.cc.

Member Function Documentation

◆ getValue()

void * Arcane::ThreadPrivateStorage::getValue ( )

Definition at line 45 of file ThreadPrivate.cc.

◆ initialize()

void Arcane::ThreadPrivateStorage::initialize ( )

Initializes the key containing thread-private values. This method can be called multiple times and does nothing if the key has already been initialized.

Warning
This method is not thread-safe. The user must therefore be careful during the first call.

Definition at line 36 of file ThreadPrivate.cc.

◆ setValue()

void Arcane::ThreadPrivateStorage::setValue ( void * v)

Definition at line 51 of file ThreadPrivate.cc.

Member Data Documentation

◆ m_storage

GlibPrivate* Arcane::ThreadPrivateStorage::m_storage
private

Definition at line 64 of file ThreadPrivate.h.


The documentation for this class was generated from the following files: