| 349 | |
| 350 | |
| 351 | CIndex 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 | |
| 360 | GElementPtr GElement::setThreadPool(UThreadPoolPtr ptr) { |
nothing calls this directly
no outgoing calls
no test coverage detected