public void Stop(string exchangeName) { SubThread thd = this[exchangeName]; if (thd != null) { try { ZeroLog.LogInfo("consumer stop...."); thd.TogglePause(true); //TODO //线程销毁和重入 //thd.Interrupt(); } catch (Exception ex) { ZeroLog.LogInfo("consumer stop...." + ex.Message); } finally { } } }
public void Start(string exchangeName) { ZeroLog.LogInfo("consumer start...." + exchangeName); SubThread thd = this[exchangeName]; thd.TogglePause(false); thd.Start(); }