MCPcopy Create free account
hub / github.com/DISTRHO/DPF / isThisTheMainThread

Function isThisTheMainThread

dgl/src/ApplicationPrivateData.cpp:38–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38static bool isThisTheMainThread(const d_ThreadHandle mainThreadHandle) noexcept
39{
40 #ifdef DISTRHO_OS_WINDOWS
41 return GetCurrentThread() == mainThreadHandle; // IsGUIThread ?
42 #else
43 return pthread_equal(getCurrentThreadHandle(), mainThreadHandle) != 0;
44 #endif
45}
46
47// --------------------------------------------------------------------------------------------------------------------
48

Callers 1

quitMethod · 0.85

Calls 1

getCurrentThreadHandleFunction · 0.85

Tested by

no test coverage detected