Queues the given function to run in the main thread as soon as possible and waits for it to complete. Returns null/false if the function failed to send the result. (although that usually cannot happen in practice) This pollable is cancel-safe and won’t be destroyed until the function finishes running or is confirmed to be aborted.
Function waitForMainThread
#include <Geode/utils/async.hpp>F&&func
)