What happens if a thread throws an exception inside synchronized block ?
No matter how you exits synchronized block, either normally by finishing execution or abruptly by throwing exception, thread releases the lock it acquired while entering that synchronized block.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.