Exemplo n.º 1
0
        public void mainLoop(Object threadContext)
        {
            RequestBean req;

            try {
                while (continueFlag)
                {
                    if ((req = getNextRequest()) != null)
                    {
                        RingThread th = new RingThread(req, this);
                        ThreadPool.QueueUserWorkItem(th.doRing);
                        Thread.Sleep(100 * 1000);
                    }
                    else
                    {
                        log("sleep...");
                        Thread.Sleep(1 * 1000);
                    }
                }

                log("已停止...");
                enabledControls(true);
            } catch (Exception e) {
                log(e.Message);
            }
        }
Exemplo n.º 2
0
        public void mainLoop(Object threadContext)
        {
            RequestBean req;
            try {
                while (continueFlag) {

                    if ((req = getNextRequest ()) != null) {
                        RingThread th = new RingThread (req, this);
                        ThreadPool.QueueUserWorkItem (th.doRing);
                        Thread.Sleep (100 * 1000);
                    } else {
                        log("sleep...");
                        Thread.Sleep (1 * 1000);
                    }
                }

                log ("已停止...");
                enabledControls (true);
            } catch (Exception e) {
                log (e.Message);
            }
        }