Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

static variables in threads

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?
0
chsalvia
Asked:
chsalvia
1 Solution
 
sunnycoderCommented:
Hi chsalvia,

Yes you are correct.

Cheers!
sunnycoder
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now