Glib 2.30 API allows setting thread priority via GThreadPriority enum. However, that API is deprecated as of 2.32 and I can’t find any info on setting thread priorities using the new API. I’ve Ctrl+F’d through all thread-related sections in the API refrence and found nothing priority-related. Google also doesn’t seem to know anything.
So is assigning priority to a thread possible in the 2.32 API at all? If yes, how to do it on creation and is it possible to change it after the thread is created? I know at that pthread supports all this, but I’d prefer to stick to the platform-independent Glib API.
Setting thread priorities is gone. In the glib git log this commit explains why
Maybe using a threadpool and the
g_thread_pool_set_sort_function ()could be fine ?