| 484 | |
| 485 | #if MGB_ENABLE_COMP_NODE_ASYNC_INIT |
| 486 | void CompNodeEnv::wait_async_init() { |
| 487 | if (std::this_thread::get_id() == m_async_init_tid) |
| 488 | return; |
| 489 | |
| 490 | MGB_LOCK_GUARD(m_async_init_mtx); |
| 491 | if (m_async_init_need_wait.load()) { |
| 492 | m_async_init_future.wait(); |
| 493 | m_async_init_need_wait.store(false); |
| 494 | m_async_init_future.get(); |
| 495 | } |
| 496 | } |
| 497 | #endif |
| 498 | |
| 499 | void CompNodeEnv::on_bad_device_type(DeviceType expected) const { |
no test coverage detected