本文整理汇总了C++中Host::processingResource方法的典型用法代码示例。如果您正苦于以下问题:C++ Host::processingResource方法的具体用法?C++ Host::processingResource怎么用?C++ Host::processingResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Host
的用法示例。
在下文中一共展示了Host::processingResource方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: servePendingRequests
void Loader::servePendingRequests(Priority minimumPriority)
{
if (m_isSuspendingPendingRequests)
return;
m_requestTimer.stop();
m_nonHTTPProtocolHost->servePendingRequests(minimumPriority);
Vector<Host*> hostsToServe;
m_hosts.checkConsistency();
HostMap::iterator i = m_hosts.begin();
HostMap::iterator end = m_hosts.end();
for (; i != end; ++i)
hostsToServe.append(i->second.get());
for (unsigned n = 0; n < hostsToServe.size(); ++n) {
Host* host = hostsToServe[n];
if (host->hasRequests())
host->servePendingRequests(minimumPriority);
else if (!host->processingResource()) {
AtomicString name = host->name();
m_hosts.remove(name.impl());
}
}
}
示例2: servePendingRequests
void Loader::servePendingRequests(Priority minimumPriority)
{
m_requestTimer.stop();
m_nonHTTPProtocolHost.servePendingRequests(minimumPriority);
Vector<Host*> hostsToServe;
copyValuesToVector(m_hosts, hostsToServe);
for (unsigned n = 0; n < hostsToServe.size(); ++n) {
Host* host = hostsToServe[n];
if (host->hasRequests())
host->servePendingRequests(minimumPriority);
else if (!host->processingResource()){
AtomicString name = host->name();
delete host;
m_hosts.remove(name.impl());
}
}
}