• 关于多线程实现的一般过程。


     例子如下:

    private static bool stop = false; //线程是否停止标志

    // 定时获取短信线程函数
             public static void ThreadProc()
            {
                while (!stop)
                {
                    Get_Info_Message();
                    Thread.Sleep(1000);
                }
            }
           
            // 线程开始
       
            public static void StartReceiveMessage()
            {
                Thread t = new Thread(new ThreadStart(ThreadProc));
                t.Start();
            }
              //线程结束
         
            public static void StopReceiveMessage()
            {
                stop = true;
            }

     另外在Global.asax调用 线程开始函数可以实现一运行系统就调用线程。

    一起学习GIS及其二次开发,一起进步!
  • 相关阅读:
    iOS.CM5.CM4.CM2
    iOS.Library.Architecture
    iOS.Info.plist
    iOS.ARM-Assembly
    Tools.Png.Compression
    MacDev.GetArchOfLibrary
    iOS.C
    iOS.Notification.Bar.Color
    iOS.-.cxx_destruct
    iOS.UITableView.SectionIndex
  • 原文地址:https://www.cnblogs.com/tuncaysanli/p/1390314.html
Copyright © 2020-2023  润新知