reentrant lock example