Run a single task and return an allocated result.
[in] client Structure previously initialized with
gearman_client_create() or gearman_client_clone().
[in] function_name The name of the function to run.
[in] unique Optional unique job identifier, or NULL for a new UUID.
[in] workload The workload to pass to the function when it is run.
[in] workload_size Size of the workload.
[out] result_size The size of the data being returned.
[out] ret_ptr Standard gearman return value. In the case of
GEARMAN_WORK_DATA, GEARMAN_WORK_WARNING, or GEARMAN_WORK_STATUS, the caller
should take any actions to handle the event and then call this function
again. This may happen multiple times until a GEARMAN_WORK_ERROR,
GEARMAN_WORK_FAIL, or GEARMAN_SUCCESS (work complete) is returned. For
GEARMAN_WORK_DATA or GEARMAN_WORK_WARNING, the result_size will be set to
the intermediate data chunk being returned and an allocated data buffer
will be returned. For GEARMAN_WORK_STATUS, the caller can use
gearman_client_do_status() to get the current tasks status.
The result allocated by the library, this needs to be freed when the
caller is done using it.