/* * Stop the underlying EdgeListener. This is important to stop any * thread and resources that might be allocated by that EdgeListener. */ public void Stop() { foreach (Edge e in _unannounced.Values) { try { e.Close(); } catch (Exception ex) { ProtocolLog.WriteIf(ProtocolLog.Exceptions, ex.ToString()); } } _running = false; if (_rrm_fe != null) { _rrm_fe.TryCancel(); } if (_edge_fe != null) { _edge_fe.TryCancel(); } if (_timer_thread != null) { _timer_thread.Join(); } _el.Stop(); }
/// <summary> Must stop the Recycling thread.</summary> public void Stop() { if (System.Threading.Interlocked.Exchange(ref _stopped, 1) == 1) { return; } _fe.TryCancel(); }
/// <summary></summary> public void Stop() { if (Interlocked.Exchange(ref _stopped, 1) == 1) { return; } _sa_check.TryCancel(); foreach (SecurityAssociation sa in _sas) { sa.Close("Shutting down..."); } }
/// <summary>No more TAs are necessary.</summary> virtual public bool EndFindingTAs() { FuzzyEvent fe = _fe; if (Interlocked.Exchange(ref _running, 0) == 0) { return(false); } if (fe != null) { fe.TryCancel(); } return(true); }
/* * Stop the underlying EdgeListener. This is important to stop any * thread and resources that might be allocated by that EdgeListener. */ public void Stop() { foreach (Edge e in _unannounced.Values) { try { e.Close(); } catch (Exception ex) { Console.WriteLine(ex); } } _running = false; if (_fe != null) { _fe.TryCancel(); } _el.Stop(); }
/// <summary>All nodes are disconnected? Stop the PathEL.</summary> protected virtual void StopPem(DateTime now) { ApplicationNode appnode = _app_node; bool stop = appnode == null; if (!stop) { stop = appnode.Node.ConState == Node.ConnectionState.Disconnected; } if (stop) { foreach (PathELManager pem in _type_to_pem.Values) { pem.Stop(); } _type_to_pem.Clear(); _fe_stop_pem.TryCancel(); } }
/// <summary>Stops the running of the job, node disconnection also calls it.</summary> public void Stop() { _fe.TryCancel(); }
override public void Stop() { _check_state.TryCancel(); base.Stop(); }