c#之线程池
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading;
namespace ConsoleApplication1
{
class Program
{
public delegate void del();
static void Main(string[] args)
{
Console.WriteLine("xsa");
//Thread t = new Thread(test);
//t.Start();
ThreadPool.QueueUserWorkItem(new WaitCallback(test));
Thread.Sleep(200);
Console.WriteLine("end");
Console.ReadKey();
}
static public void test(object par)
{
for (int i = 0; i < 5; i++)
{
Console.WriteLine("sss");
Thread.Sleep(100);
}
}
}
}
//string s = "select count(*) from t_t_cw_defaultitem where itemname=" + "'" + itemname + "'" + " and " + " itemchild=" + "'" + itemchild + "'" + " and " + "itemtermyear=" + "'" + itemtermyear + "'" + "," + " and " + "'" + itemoryear + "'";

浙公网安备 33010602011771号