#EAsyncClosure provides a simple way to run an asynchronous function synchronously without blocking a running #GMainLoop or using threads.
Create an #EAsyncClosure with e_async_closure_new().
Call the asynchronous function passing e_async_closure_callback() as the #GAsyncReadyCallback argument and the #EAsyncClosure as the data argument.
Call e_async_closure_wait() and collect the #GAsyncResult.
Call the corresponding asynchronous "finish" function, passing the #GAsyncResult returned by e_async_closure_wait().
If needed, repeat steps 2-4 for additional asynchronous functions using the same #EAsyncClosure.
Finally, free the #EAsyncClosure with e_async_closure_free().
#EAsyncClosure provides a simple way to run an asynchronous function synchronously without blocking a running #GMainLoop or using threads.
Create an #EAsyncClosure with e_async_closure_new().
Call the asynchronous function passing e_async_closure_callback() as the #GAsyncReadyCallback argument and the #EAsyncClosure as the data argument.
Call e_async_closure_wait() and collect the #GAsyncResult.
Call the corresponding asynchronous "finish" function, passing the #GAsyncResult returned by e_async_closure_wait().
If needed, repeat steps 2-4 for additional asynchronous functions using the same #EAsyncClosure.
Finally, free the #EAsyncClosure with e_async_closure_free().