20 #ifndef MPD_THREAD_HXX 21 #define MPD_THREAD_HXX 36 HANDLE handle =
nullptr;
48 bool creating =
false;
70 return handle !=
nullptr;
82 return GetCurrentThreadId() == id;
85 constexpr
bool creating =
false;
88 pthread_equal(pthread_self(), handle));
92 bool Start(
void (*f)(
void *ctx),
void *ctx);
97 static DWORD WINAPI ThreadProc(LPVOID ctx);
99 static void *ThreadProc(
void *ctx);
bool Start(void(*f)(void *ctx), void *ctx)
gcc_pure bool IsInside() const noexcept
Check if this thread is the current thread.