submit


Description:

public Future submit (string? thread_name, owned ThreadFunc thread_func)

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.

Parameters:

this

a `DexThreadPool`

thread_name

the name to use for debugging the returned future

thread_func

the function to run on a pooled thread

user_data

closure data for thread_func

user_data_destroy

destroy notify for user_data

Returns:

a future that resolves when the work completes