ThreadsafeArray
public class ThreadsafeArray<Value>
extension ThreadsafeArray: Encodable where Value: Encodable
extension ThreadsafeArray: Decodable where Value: Decodable
Threadsafe array using reader/writer pattern Codeable/Decodable if the contained type is
-
Init
Declaration
Swift
public init(_ newArray: [Value])Parameters
newArrayInitial Array
-
if value is decodable, provide decodable initialiser
Declaration
Swift
required public init(from decoder: Decoder) throws where Value: Decodable -
Return the regular array
Declaration
Swift
public var unsafeContents: [Value] { get } -
Undocumented
Declaration
Swift
public subscript(index: Int) -> Value? { get set } -
Append
Declaration
Swift
public func append(_ newValue: Value)Parameters
newValuelike an array
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
ThreadsafeArray Class Reference