MCPcopy Create free account
hub / github.com/X-Profiler/xprofiler / ThreadMain

Method ThreadMain

src/xpf_thread.cc:69–85  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

67
68// static
69void XpfThread::ThreadMain(void* arg) {
70 XpfThread* that = reinterpret_cast<XpfThread*>(arg);
71 uv_loop_init(&that->loop_);
72
73 {
74 Mutex::ScopedLock scoped_lock(that->thread_start_lock_);
75
76 uv_async_init(&that->loop_, &that->stop_async_, StopRequest);
77
78 that->ThreadEntry(&that->loop_);
79
80 that->thread_start_condition_.Broadcast(scoped_lock);
81 }
82 uv_run(&that->loop_, UV_RUN_DEFAULT);
83
84 CheckedUvLoopClose(&that->loop_);
85}
86
87// static
88void XpfThread::StopRequest(uv_async_t* handle) {

Callers

nothing calls this directly

Calls 3

CheckedUvLoopCloseFunction · 0.85
BroadcastMethod · 0.80
ThreadEntryMethod · 0.45

Tested by

no test coverage detected