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);
static gcc_const ThreadId Null() noexcept
A low-level identification for a thread.
ThreadId()=default
No initialisation.
gcc_pure bool operator==(const ThreadId &other) const noexcept
bool IsInside() const noexcept
Check if this thread is the current thread.
gcc_pure bool IsNull() const noexcept
constexpr ThreadId(pthread_t _id)
static gcc_pure const ThreadId GetCurrent() noexcept
Return the current thread's id .