Brunet.Messaging.IPHandler.Stop C# (CSharp) Метод

Stop() публичный Метод

Called to interrupt the _listen_thread.
public Stop ( ) : void
Результат void
    public void Stop() {
      Interlocked.Exchange(ref _running, 0);
      lock( _sync ) {
        _sub = null;
      }
      _uc.Close();
      if(_mc != null) {
        _mc.Close();
      }
      if( Thread.CurrentThread != _listen_thread ) {
        // Join if we are in a different thread
        _listen_thread.Join();
      }
    }

Usage Example

Пример #1
0
 public void Close()
 {
     Interlocked.Exchange(ref _running, 0);
     _timer.Join();
     IPHandler.Stop();
 }