Method
GLibThreadPoolset_sort_function
Declaration
void
g_thread_pool_set_sort_function (
GThreadPool* pool,
GCompareDataFunc func,
gpointer user_data
)
Description
Sets the function used to sort the list of tasks. This allows the
tasks to be processed by a priority determined by func
, and not
just in the order in which they were added to the pool.
Note, if the maximum number of threads is more than 1, the order that threads are executed cannot be guaranteed 100%. Threads are scheduled by the operating system and are executed at random. It cannot be assumed that threads are executed in the order they are created.
Available since: | 2.10 |
This method is not directly available to language bindings. |
Parameters
func |
GCompareDataFunc |
The |
|
user_data |
gpointer |
User data passed to |
|
The argument can be NULL . | |
The data is owned by the caller of the function. |