VS调试器并行任务中“等待”是什么意思?

时间:2013-01-03 14:12:25

标签: c# visual-studio-2010 debugging parallel-processing task

3   Waiting HtmlAgilityPack.HtmlWeb.Get ProcessTorrent.AnonymousMethod__6() 6904 (Worker Thread)    1 (torrent.vshost.exe)
4   Running HtmlAgilityPack.HtmlWeb.Get ProcessTorrent.AnonymousMethod__6() 6880 (Worker Thread)    1 (torrent.vshost.exe)
5   Waiting HtmlAgilityPack.HtmlWeb.Get ProcessTorrent.AnonymousMethod__6() 6884 (Worker Thread)    1 (torrent.vshost.exe)
6   Waiting HtmlAgilityPack.HtmlWeb.Get ProcessTorrent.AnonymousMethod__6() 6536 (Worker Thread)    1 (torrent.vshost.exe)
7   Waiting HtmlAgilityPack.HtmlWeb.Get ProcessTorrent.AnonymousMethod__6() 6992 (Worker Thread)    1 (torrent.vshost.exe)
8   Waiting HtmlAgilityPack.HtmlWeb.Get ProcessTorrent.AnonymousMethod__6() 5148 (Worker Thread)    1 (torrent.vshost.exe)
9   Waiting HtmlAgilityPack.HtmlWeb.Get ProcessTorrent.AnonymousMethod__6() 7016 (Worker Thread)    1 (torrent.vshost.exe)
10  Running HtmlAgilityPack.HtmlDocument.Load   ProcessTorrent.AnonymousMethod__6() 7096 (Worker Thread)    1 (torrent.vshost.exe)
11  Waiting HtmlAgilityPack.HtmlWeb.Get ProcessTorrent.AnonymousMethod__6() 6988 (Worker Thread)    1 (torrent.vshost.exe)

你只能看到2个正在运行的任务,这是否意味着处于等待状态的其他任务正在等待2个正在运行的任务完成,或者他们在等待HtmlAgilityPack.HtmlWeb.Get完成?

1 个答案:

答案 0 :(得分:1)

他们可以等待任何事情。它可能是另一个线程,它可能是操作系统做某事(例如文件/网络IO完成)它可能是一个计时器,或只是在他们等待的事情完成后安排。< / p>

在这种情况下,如果该行的其余部分为:HtmlAgilityPack.HtmlWeb.Get,则表明他们正在等待网络IO。