BooleanInSync
Package: Libraries.Multitasking.Types · Inherits from: Libraries.Language.Object
The BooleanInSync class holds one boolean that tasks on different lines may use at the same time. Each action is one step: no other line can change the value in the middle of it. Use it as a flag several lines can see, for example to tell tasks to stop, or to say something was found.
Example Code
use Libraries.Multitasking.Types.BooleanInSync
class Main
action Main
BooleanInSync common
common:Set(true)
output common:Get()
end
end
Actions
Get()
This action gets the value.
Returns
boolean: The value.
Example
use Libraries.Multitasking.Types.BooleanInSync
BooleanInSync common
boolean current = common:Get()
Set(boolean value)
This action sets the value.
Parameters
valueboolean: The new value.
Example
use Libraries.Multitasking.Types.BooleanInSync
BooleanInSync common
common:Set(true)