20 #ifndef MPD_THREAD_ID_HXX
21 #define MPD_THREAD_ID_HXX
50 constexpr
ThreadId(DWORD _id):id(_id) {}
67 return *
this ==
Null();
76 return ::GetCurrentThreadId();
78 return pthread_self();
85 return id == other.id;
87 return pthread_equal(
id, other.id);
A low-level identification for a thread.
ThreadId()=default
No initialisation.
gcc_pure bool operator==(const ThreadId &other) const
static gcc_pure const ThreadId GetCurrent()
Return the current thread's id .
bool IsInside() const
Check if this thread is the current thread.
constexpr ThreadId(pthread_t _id)
static gcc_const ThreadId Null()
gcc_pure bool IsNull() const