Ejemplo n.º 1
0
 /// <summary>
 /// Stop the update thread. If the update thread is not running, silently does
 /// nothing. This method returns after the update thread has stopped.
 /// </summary>
 public virtual void StopUpdateThread()
 {
     // this will trigger the thread to terminate if it awaits the lock.
     // otherwise, if it's in the middle of replication, we wait for it to
     // stop.
     if (updateThread != null)
         updateThread.Stop();
     updateThread = null;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Stop the update thread. If the update thread is not running, silently does
 /// nothing. This method returns after the update thread has stopped.
 /// </summary>
 public virtual void StopUpdateThread()
 {
     // this will trigger the thread to terminate if it awaits the lock.
     // otherwise, if it's in the middle of replication, we wait for it to
     // stop.
     if (updateThread != null)
     {
         try
         {
             updateThread.Stop();
         }
         catch (Exception ie) when(ie.IsInterruptedException())
         {
             throw new Util.ThreadInterruptedException(ie);
         }
     }
     updateThread = null;
 }