/// <summary> /// Blocks the calling thread until a thread terminates, /// while continuing to perform standard COM and SendMessage pumping. /// </summary> public void Join() { if (ThreadObject != null) { ThreadObject.Join(); } }
public void Stop() { LogTo.Info("Stopping scheduler thread"); IsRunning = false; ThreadObject?.Join(); }
/// <summary> /// Blocks the calling thread until a thread terminates or the specified time elapses, /// while continuing to perform standard COM and SendMessage pumping. /// </summary> /// <param name="timeout">a System.TimeSpan set to the amount of time to wait /// for the thread to terminate </param> public bool Join(TimeSpan timeout) { return(ThreadObject != null && ThreadObject.Join(timeout)); }
/// <summary> /// Blocks the calling thread until a thread terminates or the specified time elapses, /// while continuing to perform standard COM and SendMessage pumping. /// </summary> /// <param name="millisecondsTimeout">the number of milliseconds to wait for the /// thread to terminate</param> public bool Join(int millisecondsTimeout) { return(ThreadObject != null && ThreadObject.Join(millisecondsTimeout)); }
/// <summary> /// Blocks the calling thread until a thread terminates or the specified time elapses, /// while continuing to perform standard COM and SendMessage pumping. /// </summary> /// <param name="timeout">a System.TimeSpan set to the amount of time to wait /// for the thread to terminate </param> public bool Join(TimeSpan timeout) { return(ThreadObject != null?ThreadObject.Join(timeout) : false); }
/// <summary> /// Blocks the calling thread until a thread terminates, /// while continuing to perform standard COM and SendMessage pumping. /// </summary> public void Join() { ThreadObject?.Join(); }