MCPcopy Create free account
hub / github.com/catboost/catboost / TestSimpleIntrusivePtrCtorTsan

Method TestSimpleIntrusivePtrCtorTsan

util/generic/ptr_ut.cpp:43–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42private:
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));

Callers

nothing calls this directly

Calls 2

StartMethod · 0.45
JoinMethod · 0.45

Tested by

no test coverage detected