In order to lock/unlock an object use the.
Lock and Unlock methods
Enter and Exit methods
Close and Open methods
Close and Allow methods