add threadLock