wpiutil: EventLoopRunner: Allow getting the loop shared_ptr.

This commit is contained in:
Peter Johnson
2018-09-23 16:14:56 -07:00
parent 6d99c0ac6c
commit de6d6c9a5c
2 changed files with 12 additions and 0 deletions

View File

@@ -63,3 +63,8 @@ void EventLoopRunner::ExecSync(LoopFunc func) {
}
}
}
std::shared_ptr<uv::Loop> EventLoopRunner::GetLoop() {
if (auto thr = m_owner.GetThread()) return thr->m_loop;
return nullptr;
}