20 #ifndef MPD_THREAD_ID_HXX 21 #define MPD_THREAD_ID_HXX 50 constexpr
ThreadId(DWORD _id):id(_id) {}
65 return *
this ==
Null();
74 return ::GetCurrentThreadId();
76 return pthread_self();
88 return id == other.id;
static constexpr 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 .