Platforms to show: All Mac Windows Linux Cross-Platform

Back to AtomicFlagMBS class.

AtomicFlagMBS.Clear

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Atomic MBS Util Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Clears the flag.

AtomicFlagMBS.Constructor   New in 26.3

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Atomic MBS Util Plugin 26.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor.
Example
Var a As New AtomicFlagMBS

Messagebox "Value: "+a.Value.ToString

Sets flag to false.

See also:

AtomicFlagMBS.Constructor(value as AtomicFlagMBS)   New in 26.3

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Atomic MBS Util Plugin 26.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The copy constructor.
Example
Var a As New AtomicFlagMBS(True)
Var c As New AtomicFlagMBS(a)

Messagebox "Value: "+c.Value.ToString

Copies the flag value.

See also:

AtomicFlagMBS.Constructor(value as Boolean)   New in 26.3

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Atomic MBS Util Plugin 26.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor.
Example
Var a As New AtomicFlagMBS(True)

Messagebox "Value: "+a.Value.ToString

Sets flag to true or false depending on the parameter.

See also:

AtomicFlagMBS.Operator_Compare(other as AtomicFlagMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Atomic MBS Util Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Compares two atomic flags.
Example
Var a As AtomicFlagMBS = True
Var b As AtomicFlagMBS = False

If a > b Then
// works
Break
Else
// failed
Break
End If

AtomicFlagMBS.Operator_Convert as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Atomic MBS Util Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts the flag to a boolean.

See also:

AtomicFlagMBS.Operator_Convert(value as Boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Atomic MBS Util Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts a boolean to be the new value.

See also:

AtomicFlagMBS.Test as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Atomic MBS Util Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Checks current value and reports back.

AtomicFlagMBS.TestAndSet as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Atomic MBS Util Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Tests value and sets flag.
Example
Var f As New AtomicFlagMBS

// lock
Var b As Boolean = f.TestAndSet
If Not b Then
// got lock
Break

// unlock
f.Clear
Else
// failed to lock
Break
End If

Atomically changes the state of a flag to set (true) and returns the value it held before.

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...