• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to understand statement

 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic