Data Structures |
struct | gearman_task_st |
Functions |
GEARMAN_LOCAL gearman_task_st * | gearman_task_create (gearman_client_st *client, gearman_task_st *task) |
void | gearman_task_free (gearman_task_st *task) |
const void * | gearman_task_context (const gearman_task_st *task) |
void | gearman_task_set_context (gearman_task_st *task, void *context) |
const char * | gearman_task_function_name (const gearman_task_st *task) |
const char * | gearman_task_unique (const gearman_task_st *task) |
const char * | gearman_task_job_handle (const gearman_task_st *task) |
bool | gearman_task_is_known (const gearman_task_st *task) |
bool | gearman_task_is_running (const gearman_task_st *task) |
uint32_t | gearman_task_numerator (const gearman_task_st *task) |
uint32_t | gearman_task_denominator (const gearman_task_st *task) |
void | gearman_task_give_workload (gearman_task_st *task, const void *workload, size_t workload_size) |
size_t | gearman_task_send_workload (gearman_task_st *task, const void *workload, size_t workload_size, gearman_return_t *ret_ptr) |
const void * | gearman_task_data (const gearman_task_st *task) |
size_t | gearman_task_data_size (const gearman_task_st *task) |
void * | gearman_task_take_data (gearman_task_st *task, size_t *data_size) |
size_t | gearman_task_recv_data (gearman_task_st *task, void *data, size_t data_size, gearman_return_t *ret_ptr) |
Detailed Description
The task functions are used to manage tasks being run by clients. They are most commonly used with the client interface.
Function Documentation
Initialize a task structure.
- Parameters:
-
- Returns:
- On success, a pointer to the (possibly allocated) structure. On failure this will be NULL.
Free a task structure.
- Parameters:
-
Get function name associated with a task.
Get unique identifier for a task.
Get job handle for a task.
Get status on whether a task is known or not.
Get status on whether a task is running or not.
Get the numerator of percentage complete for a task.
Get the denominator of percentage complete for a task.
void gearman_task_give_workload |
( |
gearman_task_st * |
task, |
|
|
const void * |
workload, |
|
|
size_t |
workload_size | |
|
) |
| | |
Give allocated memory to task. After this, the library will be responsible for freeing the workload memory when the task is destroyed.
Send packet workload for a task.
Get result data being returned for a task.
Get result data size being returned for a task.
void* gearman_task_take_data |
( |
gearman_task_st * |
task, |
|
|
size_t * |
data_size | |
|
) |
| | |
Take allocated result data from task. After this, the caller is responsible for free()ing the memory.
Read result data into a buffer for a task.