A
aesper
I have a question about using statics in a multithreaded application.
I know that when threads share resources we need to be carefull and make
sure they are well synchronized when accessing these resources. My question
is about static methods that only deal with mehod-local variables. Do we
need to do any special locking if such method can be called from different
threads simultaneously?
Does the locking of static methods happen automatically?
Any help is appreciated.
I know that when threads share resources we need to be carefull and make
sure they are well synchronized when accessing these resources. My question
is about static methods that only deal with mehod-local variables. Do we
need to do any special locking if such method can be called from different
threads simultaneously?
Does the locking of static methods happen automatically?
Any help is appreciated.