|Don't ask to ask, just ask|
Re^2: Threads: why locking is required when using shared variablesby ikegami (Pope)
|on Oct 20, 2006 at 17:17 UTC||Need Help??|
That reminds me of a very useful bit of information reguarding locking. A single lock variable can be used to control access to multiple shared variables. For example,
It doesn't matter which variable is used as to control access to a give shared variable, as long as you *always* use the same lock variable to control access to that shared variable.