MNAtomicBoolean
open class MNAtomicBoolean
Encapsulates a dispatch sempahore with boolean value
-
Creates an instance of the class with the specified parametrs.
Declaration
Swift
public init(_ val: Bool)Parameters
valInitial value for the atomic boolean property
-
Declaration
Swift
public func get() -> BoolReturn Value
the value property
-
Gives a new value for the val property
Declaration
Swift
public func set(_ val: Bool)Parameters
valThe new value for the val property
-
Negates the current value of the val property. Changes the value to false if currently true, changes it to true if current false.
Declaration
Swift
public func toggle()
MNAtomicBoolean Class Reference