Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

synchronized context

 
David Wooddall-Gainey
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello and TIA,

K&B book, p 708 "When a thread is executing code from within a synchronized block, including any method invoked from that synchronized block, the code is said to be executing in a synchronized context."

Questions:
1) Is this the definition of a "synchronized context" ;i.e., a synchronized block and all subsequent code invoked from that block?

2)And, on the contrary, a synchronized method is NOT a synchronized context?
 
Thirugnanam Saravanan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Synchronized context refers to either Synchronized methods or Synchronized blocks.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a synchronized block and all subsequent code invoked from that block?


Anything that is running in synchronized mode is said to be in synchronized context
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic