else if(queueSize() == 0) /* queueSize()已經被同步 */
{
break;
}
URLToDownload nextURL;
synchronized(queue)
{
nextURL = queue.getNextInQueue();
downloadsInProgress++;
}
synchronized(urlsDownloading)
{
urlsDownloading.add(nextURL);
}
int newDepth = nextURL.getDepth() + 1; **********************
synchronized(queue)
{
nextURL = queue.getNextInQueue();
if(nextURL == null)
{
continue;
}
downloadsInProgress++;
}
只有注冊用戶登錄后才能發表評論。 | ||
![]() |
||
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
|
||
相關文章:
|
||