Stops all currently unused threads.
This does not change the maximal number of unused threads. This function can be used to regularly stop all unused threads e.g. from g_timeout_add.
g_timeout_add