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