Despite me reading wikipedia and such, I still don’t really understand what Thread Safety means in a programming sense. Is anyone able to give some Java examples in layman terms? Such as what makes a thread safe vs a thread unsafe?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think it is helpful to think in terms of concrete things outside the computer. (Concurrent programming was being done long before the invention of digital computers.)
A car is a process. An intersection is a shared resource. If the light is green in multiple directions at the same time, then it is probably not thread safe.