Poco

class ThreadLocalStorage

File Information

Library: Foundation
Package: Threading
Header: Poco/ThreadLocal.h

Description

This class manages the local storage for each thread. Never use this class directly, always use the ThreadLocal template for managing thread local storage.

Member Summary

Member Functions: clear, current, get

Constructors

ThreadLocalStorage

ThreadLocalStorage();

Creates the TLS.

Destructor

~ThreadLocalStorage

~ThreadLocalStorage();

Deletes the TLS.

Member Functions

clear static

static void clear();

Clears the current thread's TLS object. Does nothing in the main thread.

current static

static ThreadLocalStorage & current();

Returns the TLS object for the current thread (which may also be the main thread).

get

TLSAbstractSlot * & get(
    const void * key
);

Returns the slot for the given key.

Securely control IoT edge devices from anywhere   Connect a Device