Possible Duplicate:
Difference between lock(locker) and lock(variable_which_I_am_using)
In all of the "thread-safe" code examples i've seen, they lock on a separate dummy object. Why cant locks be directly performed on the data in question?
Possible Duplicate:
Difference between lock(locker) and lock(variable_which_I_am_using)
In all of the "thread-safe" code examples i've seen, they lock on a separate dummy object. Why cant locks be directly performed on the data in question?