本文整理汇总了C++中CurOp::killPendingStrict方法的典型用法代码示例。如果您正苦于以下问题:C++ CurOp::killPendingStrict方法的具体用法?C++ CurOp::killPendingStrict怎么用?C++ CurOp::killPendingStrict使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CurOp
的用法示例。
在下文中一共展示了CurOp::killPendingStrict方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getOp
CurOp* CurOp::getOp(const BSONObj& criteria) {
// Regarding Matcher: This is not quite the right hammer to use here.
// Future: use an actual property of CurOp to flag index builds
// and use that to filter.
// This will probably need refactoring once we change index builds
// to be a real command instead of an insert into system.indexes
Matcher matcher(criteria);
Client& me = cc();
scoped_lock client_lock(Client::clientsMutex);
for (std::set<Client*>::iterator it = Client::clients.begin();
it != Client::clients.end();
it++) {
Client *client = *it;
verify(client);
CurOp* curop = client->curop();
if (client == &me || curop == NULL) {
continue;
}
if ( !curop->active() )
continue;
if ( curop->killPendingStrict() )
continue;
BSONObj info = curop->description();
if (matcher.matches(info)) {
return curop;
}
}
return NULL;
}