I create two threads,and they share class A;
Qt Code:
  1. class A
  2. {
  3. public:
  4. void method_1()
  5. {
  6. QMutexLocker locker(&mutex);
  7. ......
  8. method_2();
  9. ......
  10. }
  11. void method_2()
  12. {
  13. QMutexLocker locker(&mutex);//Does this code need?
  14. ........
  15. }
  16. public:
  17. mutable QMutex mutex;
  18.  
  19. }
To copy to clipboard, switch view to plain text mode 
I do not know the second locker is need or not,please please tell me.