Exemplo n.º 1
0
 private void NotifyAboutCorrelationFailure(CancellationToken token)
 {
     if (WaitHandle.WaitAny(new[] { token.WaitHandle, _frameReceived.WaitHandle }, 5000)
         == WaitHandle.WaitTimeout)
     {
         CorrelationFailed?.Invoke(this, EventArgs.Empty);
     }
 }
Exemplo n.º 2
0
        // </SnippetMultiFrameArrived>

        // <SnippetNotifyCorrelationFailure>
        private void NotifyAboutCorrelationFailure(CancellationToken token)
        {
            // If in 5 seconds the token is not cancelled and frame event is not signaled,
            // correlation is most likely failed.
            if (WaitHandle.WaitAny(new[] { token.WaitHandle, _frameReceived.WaitHandle }, 5000)
                == WaitHandle.WaitTimeout)
            {
                CorrelationFailed?.Invoke(this, EventArgs.Empty);
            }
        }