Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

ManiacJoe

(10,137 posts)
9. This is exactly why you need to think about it.
Tue Jun 18, 2013, 05:27 PM
Jun 2013
I still don't understand why there is any concern that a value will overwrite another value, unless the code is sharing a variable among threads.

This is guaranteed to happen since your code is running inside the multi-threaded web server.

Sometimes sharing variables between threads is sometimes a good thing, sometimes a bad thing. Only you as the programmer knows which case your code falls into. If you do not want the variables shared, you need to code in a certain way to prevent it. It is actually quite easy do to; you just need to be aware of how you are coding things.

Recommendations

0 members have recommended this reply (displayed in chronological order):

Latest Discussions»Retired Forums»Website, DB, & Software Developers»Do I need to worry about ...»Reply #9