diff --git a/src/core/thread.d b/src/core/thread.d index 388c139..5b4493f 100644 --- a/src/core/thread.d +++ b/src/core/thread.d @@ -980,6 +980,20 @@ class Thread } } + /** + * Opaque type for the system-level thread identifier + */ + version( Windows ) alias uint ThreadAddr; + else version( Posix ) alias pthread_t ThreadAddr; + + /** + * System-level thread identifier + */ + final @property ThreadAddr threadId() + { + return m_addr; + } + /////////////////////////////////////////////////////////////////////////// // Thread Priority Actions @@ -1393,12 +1407,10 @@ private: version( Windows ) { alias uint TLSKey; - alias uint ThreadAddr; } else version( Posix ) { alias pthread_key_t TLSKey; - alias pthread_t ThreadAddr; }