Change some method about deal with multi thread

Add dedicated field in class which need lock.