Expand description
no_std thread-local storage
This module provides a level of indirection for thread-local storage, with
different options trading off performance and stability. See Mode
for more
about each of these.
Structs§
- Shim
TlsVar - Thread local storage for a variable of type
T
, initialized on first access by each thread using a function of typeF
. - Thread
Local Storage - Provider for thread local storage. For non-test usage, there should generally be a single process-wide instance.
- Thread
Local Storage Key - An opaque, per-thread identifier. These are only guaranteed to be unique for
live threads. See
ThreadLocalStorage::unregister_current_thread
. - TlsOne
Thread Storage Allocation - This is a “proxy” type to
TlsOneThreadStorage
with the same size and alignment. - TlsVar
Ref - A reference to a single thread’s instance of a TLS variable
ShimTlsVar
.
Enums§
- Mode
- Modes of operation for this module.
Constants§
- BYTES_
PER_ THREAD - This needs to be big enough to store all thread-local variables for a single thread. We fail at runtime if this limit is exceeded.