GTask: clarify that GTask assumes are running mainloop
I've been using GTask in pango to funnel some slow fontconfig calls to a thread, and I thought I was safe using
task = g_task_new (obj, NULL, NULL, NULL);
g_task_set_task_data (task, ...);
g_task_run_in_thread (task, ...);
As it turns out, despite me passing NULL for the callback and not calling any g_task_return apis, my task data is never freed unless I run a mainloop.
This was causing enormous memory leaks in commandline apps using pango.
Maybe this is as it needs to be, but it should imo be documented much more prominently.