What is Threadly?

Threadly is a Swift µframework that allows for type-safe thread-local storage.

Thread-local storage (TLS) lets you define a single variable that each thread has its own separate copy of. This is great for cases such as having a mutable global variable that can’t be safely accessed by multiple threads.

One example of this is with random number generators. Each thread can have its own seeded generator that’s mutated on a per-thread basis. While this may potentially use more memory, it’s much faster than accessing a shared global variable through a mutex.

Overview

  • Pricing: Free
  • Resource Link: https://github.com/nvzqz/Threadly
  • Resource Maker: Nikolai Vazquez
  • Mobile Platform Destination: iOS Apps
  • Mobile Platform Support: Native iOS
  • Programming Languages: Swift
  • iOS Versions Supported: iOS 8.0+, iOS 9.0+, iOS 10.0+, iOS 11.0+, iOS 12.0+
  • CocoaPods: Threadly
  • Carthage: nvzqz/Threadly
  • Swift Package Manager: https://github.com/nvzqz/Threadly.git