From 3dc106b42e788b54fa734b5aeb1cfa96220e7a48 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Mon, 10 Jun 2024 20:20:51 -0700 Subject: [PATCH] add comments in EventUtils --- src/EventUtils.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/EventUtils.hh b/src/EventUtils.hh index c2803ee1..43ae359c 100644 --- a/src/EventUtils.hh +++ b/src/EventUtils.hh @@ -9,8 +9,12 @@ #include #include +// Calls a function on the given base's event thread. This function returns +// when the call has been enqueued, not necessarily after it returns. void forward_to_event_thread(std::shared_ptr base, std::function&& fn); +// Calls a function on the given base's event thread and waits for it to +// return. Returns the value returned on that thread. template T call_on_event_thread(std::shared_ptr base, std::function&& compute) { std::optional ret;