Method
DexThreadPoolsubmit
unstable since: 1.2
Declaration [src]
DexFuture*
dex_thread_pool_submit (
DexThreadPool* pool,
const char* thread_name,
DexThreadFunc thread_func,
gpointer user_data,
GDestroyNotify user_data_destroy
)
Description [src]
Queues blocking work to run on one of the pool’s reusable threads.
The provided thread_name is applied to the returned future using
Dex.Future.set_static_name so that tracing and debugging tools can
identify the work item. It does not rename the underlying OS worker thread.
Available since: 1.2
Parameters
thread_name-
Type:
const char*The name to use for debugging the returned future.
The argument can be NULL.The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. thread_func-
Type:
DexThreadFuncThe function to run on a pooled thread.
user_data-
Type:
gpointerClosure data for
thread_func.The argument can be NULL.The data is owned by the caller of the method. user_data_destroy-
Type:
GDestroyNotifyDestroy notify for
user_data.
Return value
Type: DexFuture
A future that resolves when the work completes.
| The caller of the method takes ownership of the returned data, and is responsible for freeing it. |