MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / getThreadIndex

Method getThreadIndex

src/GraphCtrl/GraphElement/GElement.cpp:351–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349
350
351CIndex GElement::getThreadIndex() {
352 CGRAPH_THROW_EXCEPTION_BY_CONDITION((nullptr == thread_pool_), \
353 this->getName() + " getThreadIndex with no thread pool") // 理论不可能出现的情况
354
355 const auto tid = (CSize)std::hash<std::thread::id>{}(std::this_thread::get_id());
356 return thread_pool_->getThreadIndex(tid);
357}
358
359
360GElementPtr GElement::setThreadPool(UThreadPoolPtr ptr) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected