示例#1
0
        /// <summary>
        /// Starts a new thread and adds it to the current collection.
        /// </summary>
        /// <param name="thread">The thread to start.</param>
        internal void StartThread(Thread thread)
        {
            string    name = thread.Name;
            string    id   = ECPStringGenerator.GenerateString(8);
            ECPThread t    = new ECPThread(name, id, thread);

            threads.Add(t);
            t.Method.Start();
        }
示例#2
0
 /// <summary>
 /// Stops a specified thread abruptly.
 /// </summary>
 /// <param name="thread">The thread to stop.</param>
 internal void StopThread(ECPThread thread)
 {
     threads[threads.IndexOf(thread)].Method.Abort();
 }