File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,15 @@ use time::Duration;
181181#[ stable( feature = "rust1" , since = "1.0.0" ) ]
182182pub use self :: local:: { LocalKey , LocalKeyState } ;
183183
184+ // The types used by the thread_local! macro to access TLS keys. Note that there
185+ // are two types, the "OS" type and the "fast" type. The OS thread local key
186+ // type is accessed via platform-specific API calls and is slow, while the fast
187+ // key type is accessed via code generated via LLVM, where TLS keys are set up
188+ // by the elf linker. Note that the OS TLS type is always available: on macOS
189+ // the standard library is compiled with support for older platform versions
190+ // where fast TLS was not available; end-user code is compiled with fast TLS
191+ // where available, but both are needed.
192+
184193#[ unstable( feature = "libstd_thread_internals" , issue = "0" ) ]
185194#[ cfg( target_thread_local) ]
186195#[ doc( hidden) ] pub use sys:: fast_thread_local:: Key as __FastLocalKeyInner;
You can’t perform that action at this time.
0 commit comments