Locking the thread as per requests.