This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
    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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Lock on Objects  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Report post to moderator
Why does each Object in Java has a corresponding lock?
What is the utility of having such a functionality.
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Report post to moderator
Well..locks are used to obtain lock on any object.As simple as that...

seee when multiple threads are working on a single object and you want to synchronize then each thread should obtain lock on object before operating...
it is same as monitor concept in operating systems...
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Report post to moderator
Seth,

please don't post the same question multiple times. If you need to edit a post, click the little paper-and-pencil icon ().

Let's continue the discussion in this duplicate post.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!