Fix/master/is locked thread

ThreadId default value is changed to 0. In some environments, cpp client can get negative value  thread id.