Macro alloc_tls::alloc_tls_fast_with [] [src]

macro_rules! alloc_tls_fast_with {
    ($slot:expr, $name:ident, $blk:block) => { ... };
}

Access the TLS slot with maximum performance.

alloc_tls_fast_with is the macro version of TLSSlot's with method. In practice, we have found that that method is not always optimized as much as it could be, and using a macro is friendlier to the optimizer.

Safety

alloc_tls_fast_with must be called from an unsafe block. It is unsafe because if f panics, it causes undefined behavior.