[−][src]Crate os_thread_local
OS-backed thread-local storage
This library provides a ThreadLocal type which provides an alternative
to std::thread_local! that always uses the thread-local storage
primitives provided by the OS, and allows per-object thread-local storage,
while providing a similar API.
On Unix systems, pthread-based thread-local storage is used.
On Windows, fiber-local storage is used. This acts like thread-local
storage when fibers are unused, but also provides per-fiber values
after fibers are created with e.g. winapi::um::winbase::CreateFiber.
See ThreadLocal for more details.
The thread_local crate also
provides per-object thread-local storage, with a different API, and
different features, but with more performance overhead than this one.
Structs
| AccessError | An error returned by |
| ThreadLocal | A thread-local storage handle. |