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;