AtomicDictionary
Note
@unchecked Sendable because value is mutable but every access below is serialized by
lock. Key/Value are deliberately unconstrained so existing callers keep working; as
before, whether the elements are safe to use across domains remains the caller’s concern.
-
Declaration
Swift
public var count: Int { get } -
Declaration
Swift
public var keys: [Key] { get } -
Declaration
Swift
public var values: [Value] { get }
-
Declaration
Swift
public func getValue(forKey key: Key) -> Value? -
Declaration
Swift
public func removeAll() -
Declaration
Swift
public func set(value: Value, forKey key: Key) -
Declaration
Swift
public subscript(key: Key) -> Value? { get set } -
Declaration
Swift
public convenience init(dictionaryLiteral elements: (Key, Value)...) -
Declaration
Swift
public func makeIterator() -> DictionaryIterator<Key, Value>
View on GitHub