Initializes the lock for use.
This method MUST be called successfuly before calling any other method.