[MG_Remote, MG_Pipe, MG_Test, CI, tools, docs] (P6.5): the first wave completed and reviewed - archive v2, publication boundary, half-close, AcceptPair/role fixes, device re-validation

This commit is contained in:
2026-09-22 10:56:19 -04:00
parent 018fab0f5b
commit fe28bdb5f3
75 changed files with 4887 additions and 254 deletions
@@ -74,4 +74,17 @@ namespace MobileGL::MG_Remote::Transport {
std::lock_guard<std::mutex> lock(m_mutex);
return m_frames.empty() ? 0 : m_frames.front().size();
}
bool ControlInbox::WaitClosed(std::uint32_t timeoutMs) {
std::unique_lock<std::mutex> lock(m_mutex);
// Teardown has no outstanding control caller; discard queued snapshots
// so the reader can always reach EOF through its bounded inbox.
const auto deadline = std::chrono::steady_clock::now() + std::chrono::milliseconds(timeoutMs);
for (;;) {
m_frames.clear();
m_bytes = 0;
m_cv.notify_all();
if (m_result != MOBILEGL_OK || m_stop) return true;
if (m_cv.wait_until(lock, deadline) == std::cv_status::timeout) return m_result != MOBILEGL_OK;
}
}
}