Simple example for Reentrant lock Mechanism