Thread-Local Data

This lesson offers an introduction to thread-local data.

Thread-local data, also known as thread-local storage, will be created separately for each thread. It behaves similar to a static data for two reasons: it is bound for the lifetime of the thread, and it will be created at its first usage. Thread-local data belongs exclusively to the thread. A typical use-case for thread-local data is a thread-local logger.

Thread-local data is often called thread-local storage.

Let’s take a look at an example of this in the next lesson.

Get hands-on with 1000+ tech skills courses.