/// <summary> /// Stops this instance. /// </summary> public virtual void Stop() { Render = false; if (null == renderWorker) { return; } try { renderWorker.Wait(RenderInterval + TimeSpan.FromMilliseconds(RenderInterval.TotalMilliseconds * 5)); // This is a completely arbitrary number } catch (TimeoutException) { renderWorker.Abort(); } }
public void Abort() { worker.Abort(); generator.Abort(); }