20 #ifndef MPD_THREAD_HXX 21 #define MPD_THREAD_HXX 40 HANDLE handle =
nullptr;
43 pthread_t handle = pthread_t();
52 pthread_t inside_handle = pthread_t();
71 return handle !=
nullptr;
73 return handle != pthread_t();
84 return GetCurrentThreadId() == id;
92 return pthread_self() == inside_handle;
104 static DWORD WINAPI ThreadProc(LPVOID ctx);
106 static void *ThreadProc(
void *ctx);
This object stores a function pointer wrapping a method, and a reference to an instance of the method...
gcc_pure bool IsInside() const noexcept
Check if this thread is the current thread.