Increase GTask's thread pool size
Coming from evolution#2487 (comment 1827374) , the limited GTask thread pool can cause starving of the piled tasks, especially when a new GTask runs from within a GTask's pool thread and keeps waiting for the result, thus effectively blocking one of the GTask's pool thread, expecting the subtask to be served.
While one might be possibly able to make sure the "run a GTask thread from a GTask thread and wait" will not happen in a relatively small app (say thousands of lines), it's not that simple when it's an app, which depends on several libraries, where each library can run their own GTask freely (anytime, anywhere). The libraries should not expose the implementation details of using/not-using GTask for this or that call for sure, it would not help anything.
I might suggest following things, but you'd think of other/better for sure:
- a quick workaround is to increase GTask thread pool size (see the comment linked above);
- increase GTask thread pool size in an adaptive way (there is done some such thing already), when a new GTask is created from the GTask's thread pool function;
- add API to set GTask thread pool size by the apps/libraries - then the apps can increase the size by their expectations
- do a combination of the above.