日期:2014-05-17 浏览次数:20419 次
for (int i = 0; i < 10; i++)
{
Thread th = new Thread(() =>
{
for (int j = 0; j < htmlUrl.Count; j++)
{
getCount(htmlUrl[j]);
htmlUrl.Remove(htmlUrl[j]); //清空
}
});
th.Start();
}
using (fastCSharp.threading.task task = new fastCSharp.threading.task(10, true))
{
for (int i = 0; i < 10; i++)
{
task.Add(() =>
{
//do something
});
}
&nbs