Microsoft.R.Host.Broker.Lifetime.LifetimeManager.Ping C# (CSharp) Method

Ping() public method

public Ping ( ) : void
return void
        public void Ping() {
            if (_options.PingTimeout == null) {
                return;
            }

            var cts = new CancellationTokenSource(_options.PingTimeout.Value);
            cts.Token.Register(PingTimeout, cts);
            var oldCts = Interlocked.Exchange(ref _cts, cts); 
            oldCts?.Dispose();
        }

Usage Example

Ejemplo n.º 1
0
 public void Post()
 {
     _lifetimeManager.Ping();
 }