// Removes a thread after it is finished executing. private void thread_ThreadStopped(PulseThread t) { Threads.Remove(t); }
/// <summary> /// Adds a thread to the managed list and starts it. /// </summary> /// <param name="thread">thread to add to the managed list</param> public void StartThread(PulseThread thread) { thread.ThreadStopped += new PulseThread.ThreadStoppedEventDelegate(thread_ThreadStopped); Threads.Add(thread); thread.Start(); }