Exemple #1
0
        /// <summary>
        /// 启动线程
        /// </summary>
        public virtual void Start(bool IsStartImediately)
        {
            IsStop = false;

            if (State == ZThreadState.INIT)
            {
                throw new ArgumentException(this.GetType().Name + "未初始化");
            }

            State = ZThreadState.START;

            InternalThread.Start();
        }
Exemple #2
0
        /// <summary>
        /// 启动线程
        /// </summary>
        public virtual void Start(bool IsStartImediately)
        {
            IsStop = false;

            if (State == ZThreadState.INIT)
                throw new ArgumentException(this.GetType().Name + "未初始化");

            State = ZThreadState.START;

            InternalThread.Start();
        }
Exemple #3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="ThreadName">线程名称</param>
 public AbstractThread(string ThreadName)
 {
     InternalThread = new Thread(Execute);
     InternalThread.Name = ThreadName;
     State = ZThreadState.READY;
 }
Exemple #4
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="ThreadName">线程名称</param>
 public AbstractThread(string ThreadName)
 {
     InternalThread      = new Thread(Execute);
     InternalThread.Name = ThreadName;
     State = ZThreadState.READY;
 }