Synchronized code blocks using Intrinsic Lock.