| 41 | |
| 42 | private: |
| 43 | void TestSimpleIntrusivePtrCtorTsan() { |
| 44 | struct S: public TAtomicRefCount<S> { |
| 45 | }; |
| 46 | |
| 47 | struct TLocalThread: public ISimpleThread { |
| 48 | void* ThreadProc() override { |
| 49 | TSimpleIntrusivePtr<S> ptr; |
| 50 | return nullptr; |
| 51 | } |
| 52 | }; |
| 53 | |
| 54 | // Create TSimpleIntrusivePtr in different threads |
| 55 | // Its constructor should be thread-safe |
| 56 | |
| 57 | TLocalThread t1, t2; |
| 58 | |
| 59 | t1.Start(); |
| 60 | t2.Start(); |
| 61 | t1.Join(); |
| 62 | t2.Join(); |
| 63 | } |
| 64 | |
| 65 | inline void TestTypedefs() { |
| 66 | TAtomicSharedPtr<int>(new int(1)); |