Description:
Tries to increase the thread lock count by one. If the object is already locked by another thread, the lock is unsuccessful and the member function returns immediately.
Prototype:
bool TryLock();
Arguments: No arguments (void).
Return value:
Returns true if the lock is successful. If another thread has locked the object it returns false.