0001    /// Convenience wrapper for generically storing values of type `T` in thread-local storage.
0002    internal final class ThreadLocal
Regex.swift:116
    get { return ThreadLocal(_lastMatchKey).value }
Regex.swift:117
    set { ThreadLocal(_lastMatchKey).value = newValue }
<T
ThreadLocal.swift:13
      return (value as? Box<T>).map { $0.value } ?? value as? T
ThreadLocal.swift:13
      return (value as? Box<T>).map { $0.value } ?? value as? T
ThreadLocal.swift:10
  var value: T? {
> { 0003 0004 let key
ThreadLocal.swift:7
    self.key = key
ThreadLocal.swift:12
      guard let value = _currentThread.threadDictionary[key] else { return nil }
ThreadLocal.swift:16
      _currentThread.threadDictionary[key] = (newValue as? AnyObject) ?? newValue.map(Box.init)
: String 0005 0006 init
Regex.swift:116
    get { return ThreadLocal(_lastMatchKey).value }
Regex.swift:117
    set { ThreadLocal(_lastMatchKey).value = newValue }
(_ key: String) { 0007 self.key = key 0008 } 0009 0010 var value
Regex.swift:116
    get { return ThreadLocal(_lastMatchKey).value }
Regex.swift:117
    set { ThreadLocal(_lastMatchKey).value = newValue }
: T? { 0011 get { 0012 guard let value = _currentThread.threadDictionary[key] else { return nil } 0013 return (value as? Box<T>).map { $0.value } ?? value as? T 0014 } 0015 set { 0016 _currentThread.threadDictionary[key] = (newValue as? AnyObject) ?? newValue.map(Box.init) 0017 } 0018 } 0019 0020 private var _currentThread
ThreadLocal.swift:12
      guard let value = _currentThread.threadDictionary[key] else { return nil }
ThreadLocal.swift:16
      _currentThread.threadDictionary[key] = (newValue as? AnyObject) ?? newValue.map(Box.init)
: NSThread { 0021 return NSThread.currentThread() 0022 } 0023 0024 } 0025 0026 private class Box
ThreadLocal.swift:13
      return (value as? Box<T>).map { $0.value } ?? value as? T
ThreadLocal.swift:16
      _currentThread.threadDictionary[key] = (newValue as? AnyObject) ?? newValue.map(Box.init)
<T
ThreadLocal.swift:27
  let value: T
ThreadLocal.swift:28
  init(_ value: T) { self.value = value }
> { 0027 let value
ThreadLocal.swift:13
      return (value as? Box<T>).map { $0.value } ?? value as? T
ThreadLocal.swift:28
  init(_ value: T) { self.value = value }
: T 0028 init
ThreadLocal.swift:16
      _currentThread.threadDictionary[key] = (newValue as? AnyObject) ?? newValue.map(Box.init)
(_ value: T) { self.value = value } 0029 } 0030 0031 import Foundation 0032