Function
GLibThreadPoolnew_full
Declaration
GThreadPool*
g_thread_pool_new_full (
GFunc func,
gpointer user_data,
GDestroyNotify item_free_func,
gint max_threads,
gboolean exclusive,
GError** error
)
Description
This function creates a new thread pool similar to g_thread_pool_new()
but allowing item_free_func
to be specified to free the data passed
to g_thread_pool_push()
in the case that the GThreadPool
is stopped
and freed before all tasks have been executed.
Available since: | 2.70 |
Parameters
func |
GFunc |
A function to execute in the threads of the new thread pool. |
|
user_data |
gpointer |
User data that is handed over to |
|
The argument can be NULL . | |
The data is owned by the caller of the function. | |
item_free_func |
GDestroyNotify |
Used to pass as a free function to
|
|
max_threads |
gint |
The maximal number of threads to execute concurrently
in the new thread pool, |
|
exclusive |
gboolean |
Should this thread pool be exclusive? |
|
error |
GError ** |
The return location for a GError* , or NULL . |
Return value
Returns: | GThreadPool |
The new |
|
The caller of the function takes ownership of the data, and is responsible for freeing it. |