sharedvariable
nounUK /ʃɛəd ˈvɛːriəbl/
US /ʃɛrd ˈvɛriəbl/
A shared variable is a value that more than one part of a computer program can use and change.
The two functions updated the shared variable to keep track of the total score.
OTHER MEANINGS
2. A variable in a program that multiple threads can read and write at the same time.
The threads used a lock before changing the shared variable.
3. A value stored in one place that several parts of a system rely on together.
The team kept the configuration in a shared variable so every module read the same setting.
4. A variable whose value is visible across different functions or modules.
Declaring the counter as a shared variable let both files access it.