コード例 #1
0
        public ThreadEx(ThreadEx b)
        {
            m_threadFunc = b.m_threadFunc;
            m_threadParameterizedFunc = b.m_threadParameterizedFunc;
            m_parameter = b.m_parameter;
            if (m_threadFunc != null || m_parentThreadHandle != null)
            {
                m_parentThreadHandle = b.m_parentThreadHandle;
                m_threadHandle       = b.m_threadHandle;
                m_threadPriority     = b.m_threadPriority;
                m_status             = b.m_status;
                m_exitCode           = b.m_exitCode;

                b.m_parentThreadHandle = null;
                b.m_threadHandle       = null;
                b.m_status             = ThreadStatus.TERMINATED;
                b.m_exitCode           = 0;
            }
            else
            {
                m_threadHandle       = null;
                m_threadPriority     = b.m_threadPriority;
                m_parentThreadHandle = null;
                m_exitCode           = 0;

                m_status = ThreadStatus.TERMINATED;
            }
        }
コード例 #2
0
        /// <summary>
        /// 스레드의 진입 점
        /// </summary>
        /// <param name="pThis">The argument for the thread (this for current case)</param>
        private static void EntryPoint(object pThis)
        {
            ThreadEx pt = (ThreadEx)pThis;

            pt.Run();
        }