标签:false key ogr oid read 设置 new art ==
class Program
{
public static bool bStop = false;
static int x = 10;
static void Main(string[] args)
{
//定义线程
Thread LogThread = new Thread(new ThreadStart(DoService));
//设置线程为后台线程,那样进程里就不会有未关闭的程序了
LogThread.IsBackground = true;
if (bStop == false)
{
LogThread.Start();//起线程
}
Console.ReadKey();
}
private static void DoService()
{
while (true)
{
bStop = false;
SendToService();
System.Threading.Thread.Sleep(1000);//1000=1秒
}
}
private static void SendToService()
{
x++;
Console.WriteLine(x);
}
}
标签:false key ogr oid read 设置 new art ==
原文地址:https://www.cnblogs.com/zhujie-com/p/12190086.html