Namespaces
Variants
Actions

thread_local

From cppreference.com
< c‎ | thread
 
C
 
Concurrency support library
Defined in header <threads.h>
#define thread_local _Thread_local
(since C11)
(removed in C23)

Convenience macro which can be used to specify that an object has thread-local storage duration.

[edit] Notes

Since C23, thread_local is itself a keyword, which may also be a predefined macro, so <threads.h> no longer provides it.

[edit] References

  • C17 standard (ISO/IEC 9899:2018):
  • 7.26.1/3 thread_local (p: 274)
  • C11 standard (ISO/IEC 9899:2011):
  • 7.26.1/3 thread_local (p: 376)

[edit] See also

C++ documentation for thread_local

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant