Pohihihi <no*****@hotmail.com> wrote:
When a thread calls a method (and/or that method calls another
method), are they thread safe if the first method is controlled on
access?
What do you mean, exactly? Suppose FirstMethod() calls SecondMethod().
Even if there are locks to make sure that FirstMethod() is only ever
executing in one thread at a time, another thread might call
SecondMethod() directly (without going through FirstMethod()) so you
could still have two threads executing SecondMethod() at the same time.
Does that answer your question?
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too