static variables in threads

chsalvia
chsalvia used Ask the Experts™
on
If a static variable is declared within a function that is called by multiple threads, I would think the static variable would be shared among threads - e.g. it is not thread safe.  Am I correct about this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2006
Commented:
Hi chsalvia,

Yes you are correct.

Cheers!
sunnycoder

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial