Asp.NET开启一个线程,不停的执行
using System;
using System.Threading;
using System.Threading.Tasks;
class StartNewDemo
{
static void Main()
{
while (true)
{
System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ThreadStart(Run));
thread.Start();
Thread.Sleep(10000);
}
}
private static void Run()
{
Console.WriteLine("aaaa");
Console.WriteLine();
}
}