コード例 #1
0
ファイル: SubService.cs プロジェクト: dzhendong/Zero
        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
                {
                }
            }
        }
コード例 #2
0
ファイル: SubService.cs プロジェクト: dzhendong/Zero
        public void Start(string exchangeName)
        {
            ZeroLog.LogInfo("consumer start...." + exchangeName);

            SubThread thd = this[exchangeName];

            thd.TogglePause(false);
            thd.Start();
        }