/// <summary>Initialize the runnable base class.</summary> //protected SingleRunnable() : this(true,false,false) {} /// <summary>Initialize the runnable base class.</summary> /// <param name="interruptOnStop">If true, an interrupt is fired on <see cref="IRunnable.Stop"/></param> /// <param name="autoStart">If true, the runnably is started automatically.</param> //protected SingleRunnable(bool interruptOnStop, bool autoStart) : this(interruptOnStop,autoStart,false) {} /// <summary>Initialize the runnable base class.</summary> /// <param name="interruptOnStop">If true, an interrupt is fired on <see cref="IRunnable.Stop"/></param> /// <param name="autoStart">If true, the runnably is started automatically.</param> /// <param name="waitOnStop">If true, <see cref="IRunnable.Stop"/> waits until the thread really finished.</param> protected SingleRunnable(bool interruptOnStop, bool autoStart, bool waitOnStop) { if(waitOnStop) this.sync = new ThreadRendezVous(); this.sync = sync; this.interruptOnStop = interruptOnStop; if(autoStart) Start(); }
/// <summary>Initialize the runnable base class.</summary> //protected SingleRunnable() : this(true,false,false) {} /// <summary>Initialize the runnable base class.</summary> /// <param name="interruptOnStop">If true, an interrupt is fired on <see cref="IRunnable.Stop"/></param> /// <param name="autoStart">If true, the runnably is started automatically.</param> //protected SingleRunnable(bool interruptOnStop, bool autoStart) : this(interruptOnStop,autoStart,false) {} /// <summary>Initialize the runnable base class.</summary> /// <param name="interruptOnStop">If true, an interrupt is fired on <see cref="IRunnable.Stop"/></param> /// <param name="autoStart">If true, the runnably is started automatically.</param> /// <param name="waitOnStop">If true, <see cref="IRunnable.Stop"/> waits until the thread really finished.</param> protected SingleRunnable(bool interruptOnStop, bool autoStart, bool waitOnStop) { if (waitOnStop) { this.sync = new ThreadRendezVous(); } //this.sync = sync; this.interruptOnStop = interruptOnStop; if (autoStart) { Start(); } }