aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes synchronized context Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "synchronized context" Watch "synchronized context" New topic
Author

synchronized context

David Wooddall-Gainey
Greenhorn

Joined: Dec 13, 2007
Posts: 16
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

Joined: Dec 13, 2007
Posts: 81
Synchronized context refers to either Synchronized methods or Synchronized blocks.


Saravanan
SCJP 5.0(98%), SCWCD 5.0 (100%), OCA
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6592
    
    1

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


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: synchronized context
 
Similar Threads
Thread
Thread
Question about synchronized
Please explain how does this code reaches the Exception code and prints 20 GOTO 30
calling another method from synchronised block