Brunet.PathEdgeListener.Stop C# (CSharp) Method

Stop() public method

public Stop ( ) : void
return void
    public override void Stop() {
      if( 0 == Interlocked.Exchange(ref _is_started, 0) ) {
        return;
      }
      //Actually stopped this time.
      _pem.RemovePath(_path);
    }

Usage Example

Example #1
0
        /** Removes a path from the PEM and Closes it if it is still operational.
         */
        public void RemovePath(string path)
        {
            PathEdgeListener pel = null;

            lock ( _sync ) {
                if (!_pel_map.TryGetValue(path, out pel))
                {
                    return;
                }
                _pel_map.Remove(path);
            }

            if (pel != null)
            {
                pel.Stop();
            }
        }