internal ThreadInfo(ThreadInfoPacket packet)
 {
     m_Packet         = packet;
     m_ThreadInstance = 0;
     m_Caption        = null;
     m_Description    = null;
 }
        public ThreadInfo()
        {
            m_Packet             = new ThreadInfoPacket();
            m_Packet.ThreadIndex = ThreadToken.GetCurrentThreadIndex(); // Each ThreadInfo we create gets a unique index value.

            Thread thread = Thread.CurrentThread;

            m_Packet.ThreadId           = thread.ManagedThreadId;      // These can get recycled, so they aren't domain-lifetime unique.
            m_Packet.ThreadName         = thread.Name ?? string.Empty; // prevent null, but let empty name pass through
            m_Packet.DomainId           = 0;
            m_Packet.DomainName         = string.Empty;
            m_Packet.IsBackground       = thread.IsBackground;
            m_Packet.IsThreadPoolThread = false;
            m_ThreadInstance            = 0;
            m_Caption     = null;
            m_Description = null;
        }