本文整理汇总了C++中Threads::size方法的典型用法代码示例。如果您正苦于以下问题:C++ Threads::size方法的具体用法?C++ Threads::size怎么用?C++ Threads::size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Threads
的用法示例。
在下文中一共展示了Threads::size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getAllThreads
Viewer::~Viewer()
{
//OSG_NOTICE<<"Viewer::~Viewer()"<<std::endl;
Threads threads;
getAllThreads(threads);
OSG_INFO<<"Viewer::~Viewer():: start destructor getThreads = "<<threads.size()<<std::endl;
stopThreading();
if (_scene.valid() && _scene->getDatabasePager())
{
_scene->getDatabasePager()->cancel();
_scene->setDatabasePager(0);
}
Contexts contexts;
getContexts(contexts);
// clear out all the previously assigned operations
for(Contexts::iterator citr = contexts.begin();
citr != contexts.end();
++citr)
{
(*citr)->close();
}
//OSG_NOTICE<<"finish Viewer::~Viewer()"<<std::endl;
getAllThreads(threads);
OSG_INFO<<"Viewer::~Viewer() end destructor getThreads = "<<threads.size()<<std::endl;
}
示例2: getAllThreads
Viewer::~Viewer()
{
//OSG_NOTICE<<"Viewer::~Viewer()"<<std::endl;
Threads threads;
getAllThreads(threads);
OSG_INFO<<"Viewer::~Viewer():: start destructor getThreads = "<<threads.size()<<std::endl;
stopThreading();
if (_scene.valid() && _scene->getDatabasePager())
{
_scene->getDatabasePager()->cancel();
_scene->setDatabasePager(0);
}
Contexts contexts;
getContexts(contexts);
// clear out all the previously assigned operations
for(Contexts::iterator citr = contexts.begin();
citr != contexts.end();
++citr)
{
osg::GraphicsContext* gc = *citr;
// Run destroy operation on each context before closing it
if (_cleanUpOperation.valid() && gc->valid())
{
gc->makeCurrent();
(*_cleanUpOperation)(gc);
gc->releaseContext();
}
gc->close();
}
//OSG_NOTICE<<"finish Viewer::~Viewer()"<<std::endl;
getAllThreads(threads);
OSG_INFO<<"Viewer::~Viewer() end destructor getThreads = "<<threads.size()<<std::endl;
}
示例3: selectThread
void IPCEngineHost::selectThread(int index)
{
resetLocation();
Threads threads = threadsHandler()->threads();
QTC_ASSERT(index < threads.size(), return);
QByteArray p;
{
QDataStream s(&p, QIODevice::WriteOnly);
SET_NATIVE_BYTE_ORDER(s);
s << quint64(threads.at(index).id);
}
rpcCall(SelectThread, p);
}