Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

synchronized method throwing exception

Status
Not open for further replies.

nandkv

Programmer
Jul 27, 2001
3
IN
Does a synchronized method throwing exception release the object lock? Is there any case (abnormal) that a synchronized method does not release a lock?
Thankx,
Nandu
 
Hard to tell exactly what you mean from your description but once the method is complete either from a return, a thrown Exception, or an unchecked Exception. Whichever way, the method should release the lock, otherwise there would be real issues with Java as a threaded programming language.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top