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
.
this |
a ThreadWrapper object |
func |
the function to execute, not |
arg |
argument to pass to |
arg_destroy_func |
function to be called when the execution has finished, to destroy |
the job ID, or 0 if an error occurred |