コード例 #1
0
ファイル: ControlLoop.cs プロジェクト: Dylan-Watson/FRC-2017
 /// <summary>
 ///     Cancels the loop synchronously at the next available time
 /// </summary>
 public void CancelSync(object sender)
 {
     cancel = true;
     Report.General($"{GetType()} cancellation requested.");
     CancelationRequest?.Invoke(sender, new EventArgs());
     while (thread.IsAlive)
     {
         // ReSharper disable once EmptyEmbeddedStatement
         ;
     }
 }
コード例 #2
0
ファイル: ControlLoop.cs プロジェクト: Dylan-Watson/FRC-2017
 /// <summary>
 ///     Cancels the loop asynchronously at the next available time
 /// </summary>
 public void CancelAsync(object sender)
 {
     cancel = true;
     Report.General($"{GetType()} cancellation requested.");
     CancelationRequest?.Invoke(sender, new EventArgs());
 }