I need to share variables across multiple modules. These variables will be changed asynchronously by threads as the program runs.
I need to be able to access the most resent state of the variable by multi modules at the same time.
Multiple modules will also be writing to the same variable.
Basically what I need is a shared memory space, like a Global var within a module, but is accessible & changeable by all other modules asynchronously.
I'm familiar with locking a global variable within a module. I have no idea where to start doing this across multiple modules.
How is it done?