revert [23385]. make sure the object is locked when we enter the thread