How to write an automated test for thread safety

后端 未结 6 712
醉话见心
醉话见心 2020-12-31 18:29

I have a class which is not thread safe:

class Foo { 
    /* Abstract base class, code which is not thread safe */ 
};

Moreover, if you hav

6条回答
  •  梦毁少年i
    2020-12-31 18:48

    Intel Threadchecker.

    If I recall correctly the tool checks your code for theoretically possible data races. The point is you don't need to run your code to check whether it's correct or not.

提交回复
热议问题