[ Version ( since = "4.2" ) ]
public uint execute_void (owned ThreadWrapperVoidFunc func, void* arg) throws Error

Make this execute the func function with the arg argument (along with a Error which is not error) in the sub thread managed by this.

To execute a function which returns some pointer, use execute.

This method returns immediately. Calling fetch_result is not necessary as func does not return any result. However, it may be necessary to call iterate to give this a chance to execute the arg_destroy_func function if not null (note that iterate is called by fetch_result itself).

Once func's execution is finished, if arg is not null, the arg_destroy_func destruction function is called on arg. This call occurs in the thread calling fetch_result.

If an error occurred in this function, then the arg_destroy_func function is not called to free arg.



a ThreadWrapper object


the function to execute, not null


argument to pass to func


function to be called when the execution has finished, to destroy arg, or null


the job ID, or 0 if an error occurred