AtomicRef
public final class AtomicRef<T> where T : AnyObject
-
Declaration
Swift
public typealias Pointer = AtomicUSize.Pointer
-
Declaration
Swift
public typealias RawValue = AtomicUSize.RawValue
-
Declaration
Swift
@inlinable public init(_ obj: T? = nil)
-
Declaration
Swift
public var value: T? { get set }
-
Declaration
Swift
public func destroy(order: AtomicStoreMemoryOrder = .seqcst)
-
Declaration
Swift
public func load(order: AtomicLoadMemoryOrder = .seqcst) -> T?
-
Declaration
Swift
public func store(_ obj: T?, order: AtomicStoreMemoryOrder = .seqcst)
-
Declaration
Swift
public func exchange(_ obj: T?, order: AtomicMemoryOrder = .seqcst) -> T?
-
Declaration
Swift
@discardableResult public func compareExchange( _ expected: UnsafeMutablePointer<T?>, _ desired: T?, order: AtomicMemoryOrder = .seqcst, loadOrder: AtomicLoadMemoryOrder? = nil ) -> Bool
-
Declaration
Swift
@discardableResult public func compareExchange( _ expected: T?, _ desired: T?, order: AtomicMemoryOrder = .seqcst, loadOrder: AtomicLoadMemoryOrder? = nil ) -> T?
-
Declaration
Swift
@discardableResult public func compareExchangeWeak( _ expected: UnsafeMutablePointer<T?>, _ desired: T?, order: AtomicMemoryOrder = .seqcst, loadOrder: AtomicLoadMemoryOrder? = nil ) -> Bool
-
Declaration
Swift
@discardableResult public func compareExchangeWeak( _ expected: T?, _ desired: T?, order: AtomicMemoryOrder = .seqcst, loadOrder: AtomicLoadMemoryOrder? = nil ) -> T?
-
Declaration
Swift
public static func initialize(_ ptr: Pointer, to obj: T? = nil)
-
Declaration
Swift
public static func destroy(_ ref: Pointer, order: AtomicStoreMemoryOrder = .seqcst)
-
Declaration
Swift
public static func load(_ ref: Pointer, order: AtomicLoadMemoryOrder = .seqcst) -> T?
-
Declaration
Swift
public static func store(_ ref: Pointer, _ obj: T?, order: AtomicStoreMemoryOrder = .seqcst)
-
Declaration
Swift
public static func exchange(_ ref: Pointer, _ obj: T?, order: AtomicMemoryOrder = .seqcst) -> T?
-
Declaration
Swift
@discardableResult public static func compareExchange( _ ref: Pointer, _ expected: UnsafeMutablePointer<T?>, _ desired: T?, order: AtomicMemoryOrder = .seqcst, loadOrder: AtomicLoadMemoryOrder? = nil ) -> Bool
-
Declaration
Swift
@discardableResult public static func compareExchange( _ ref: Pointer, _ expected: T?, _ desired: T?, order: AtomicMemoryOrder = .seqcst, loadOrder: AtomicLoadMemoryOrder? = nil ) -> T?
-
Declaration
Swift
@discardableResult public static func compareExchangeWeak( _ ref: Pointer, _ expected: UnsafeMutablePointer<T?>, _ desired: T?, order: AtomicMemoryOrder = .seqcst, loadOrder: AtomicLoadMemoryOrder? = nil ) -> Bool
-
Declaration
Swift
@discardableResult public static func compareExchangeWeak( _ ref: Pointer, _ expected: T?, _ desired: T?, order: AtomicMemoryOrder = .seqcst, loadOrder: AtomicLoadMemoryOrder? = nil ) -> T?