• Post Reply Bookmark Topic Watch Topic
  • New Topic

Synchronization blocks  RSS feed

 
venkatesh pendharkar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
Can anyone tell me what are Synchronization blocks & how are they different from Synchronizaion methods.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They're very simple. They look like



A synchronized method like



is essentially equivalent to



Of course, synchronized blocks let you synchronize on any object, not just "this", so they're more powerful than synchronized methods.
[ October 23, 2006: Message edited by: Ernest Friedman-Hill ]
 
venkatesh pendharkar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply,now i understand use of synchronization blocks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!