예제 #1
0
 /// <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();
     }
 }
예제 #2
0
 public void Abort()
 {
     worker.Abort();
     generator.Abort();
 }