Legend:
Library
Module
Module type
Parameter
Class
Class type
Global variables with mutex.
In a GUI, it is quite likely that a thread has to modify a variable owned by another thread. This is particularly true in Bogue (because connections created by Widget.connect use a new Thread when executed, unless you specify ~priority:Main). In order to protect against concurrent access to a shared variable, one should use a special kind of variable. This is the goal of this module.
Warning: working with threads is subtle, and using Var will not magically make all problems disappear. In particular if two variables from two different threads want to access each other, you can end up into a stall, and freeze your program. This can happen more often that one thinks, because a Var may contain a Layout, and we know that sometimes layouts want to modify themselves...