本文整理汇总了C++中PROJECT::has_results方法的典型用法代码示例。如果您正苦于以下问题:C++ PROJECT::has_results方法的具体用法?C++ PROJECT::has_results怎么用?C++ PROJECT::has_results使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PROJECT
的用法示例。
在下文中一共展示了PROJECT::has_results方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: next_project_sched_rpc_pending
// find a project for which a scheduler RPC has been requested
// - by user
// - by an account manager
// - by the project
// - because the project was just attached (for verification)
//
PROJECT* CLIENT_STATE::next_project_sched_rpc_pending() {
unsigned int i;
PROJECT* p;
for (i=0; i<projects.size(); i++) {
p = projects[i];
bool honor_backoff = true;
bool honor_suspend = true;
// is a scheduler-requested RPC due?
//
if (!p->sched_rpc_pending && p->next_rpc_time && p->next_rpc_time<now) {
// don't do it if project is set to no new work
// and has no jobs currently
//
if (!p->dont_request_more_work || p->has_results()) {
p->sched_rpc_pending = RPC_REASON_PROJECT_REQ;
}
}
switch (p->sched_rpc_pending) {
case RPC_REASON_USER_REQ:
honor_backoff = false;
honor_suspend = false;
break;
case RPC_REASON_RESULTS_DUE:
break;
case RPC_REASON_NEED_WORK:
break;
case RPC_REASON_TRICKLE_UP:
break;
case RPC_REASON_ACCT_MGR_REQ:
// This is critical for acct mgrs, to propagate new host CPIDs
honor_suspend = false;
break;
case RPC_REASON_INIT:
break;
case RPC_REASON_PROJECT_REQ:
break;
}
if (honor_backoff && p->waiting_until_min_rpc_time()) {
continue;
}
if (honor_suspend && p->suspended_via_gui) {
continue;
}
if (p->sched_rpc_pending) {
return p;
}
}
return 0;
}