• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to understand statement

 
manish ghildiyal
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am currently going through book 'Java Concurrency in Practice', and sometimes statements written
in book are very difficult to comprehend. One such line I came across is:

We may talk about thread safety as if it were about code, but what we are really trying to do is
protect data from uncontrolled concurrent access.


What does it really mean? I sense that author is trying to tell reader something important here but
I am not able to really figure it out. To me, two parts of statement are actually dependent..as our aim
is to protect data from uncontrolled concurrent access and we do it by writing proper code. But the
way author has written it is as if these are two different aspects.
OR am I reading too much here?

Manish
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I think this statement should emphasize that thread-safety issues are all about mutable shared state. In general it's (almost) only access to shared mutable data which makes it hard to write correct concurrent applications.

Marco
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!