Ok, I know that, and I am not going to fall into a dispute about it (just wanted to be sure I understand you right). However, sometimes (rarely) it is not needed to read anything: that was just a theoretic sample, it could be protection for writing a log when you don't like text from different functions to be mixed or adding/removing thread from the list when you simply don't use that list anywhere else or some kind of a wrapper for not reenterant function.Exactly Thus you are protecting the function and not the variable. Somehow you don't care that one actually has to READ the variable somewhere.
Thank you for paying me attention, Master of Zen
Bookmarks