RawThreadLocalStorage

public protocol RawThreadLocalStorage

Abstracts over thread local storage.

  • Key

    The key type used to index into the thread local storage.

    Declaration

    Swift

    associatedtype Key
  • Makes a new key; the returned key should be used for the entire process lifetime.

    Declaration

    Swift

    static func makeKey() -> Key
  • Retrieves the raw pointer associated with the given key.

    Declaration

    Swift

    static func get(for key: Key) -> UnsafeMutableRawPointer?
  • Sets the raw pointer associated with the given key.

    Declaration

    Swift

    static func set(value: UnsafeMutableRawPointer?, for key: Key)