/// <summary>
        /// Creates and starts a thread for our thread manager to keep track of.
        /// </summary>
        /// <param name="functionToRun">The function the thread should run.</param>
        /// <returns>The created thread</returns>
        public static CustomThread CreateThread(ThreadStart functionToRun)
        {
            CustomThread thread = new CustomThread(functionToRun);
            ActiveThreads.Add(thread);

            return thread;
        }
        /// <summary>
        /// Creates and starts a thread for our thread manager with a callback to run when completed.
        /// </summary>
        /// <param name="functionToRun">The function the thread should run.</param>
        /// <param name="functionToRunOnComplete">The function the thread should run when it completes it's main task.</param>
        /// <returns>The created thread</returns>
        public static CustomThread CreateThread(ThreadStart functionToRun, OnThreadTaskComplete functionToRunOnComplete)
        {
            CustomThread thread = CreateThread(functionToRun);

            thread.OnThreadTaskComplete += functionToRunOnComplete;

            return(thread);
        }
        /// <summary>
        /// Creates and starts a thread for our thread manager to keep track of.
        /// </summary>
        /// <param name="functionToRun">The function the thread should run.</param>
        /// <returns>The created thread</returns>
        public static CustomThread CreateThread(ThreadStart functionToRun)
        {
            CustomThread thread = new CustomThread(functionToRun);

            ActiveThreads.Add(thread);

            return(thread);
        }