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.
Definition at line 20 of file task.c.
Free a task structure.
- Parameters:
-
Definition at line 64 of file task.c.
Get context for a task.
Definition at line 87 of file task.c.
Set context for a task.
Definition at line 92 of file task.c.
Get function name associated with a task.
Definition at line 97 of file task.c.
Get unique identifier for a task.
Definition at line 102 of file task.c.
Get job handle for a task.
Definition at line 107 of file task.c.
Get status on whether a task is known or not.
Definition at line 112 of file task.c.
Get status on whether a task is running or not.
Definition at line 117 of file task.c.
Get the numerator of percentage complete for a task.
Definition at line 122 of file task.c.
Get the denominator of percentage complete for a task.
Definition at line 127 of file task.c.
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.
Definition at line 132 of file task.c.
Send packet workload for a task.
Definition at line 138 of file task.c.
Get result data being returned for a task.
Definition at line 145 of file task.c.
Get result data size being returned for a task.
Definition at line 150 of file task.c.
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.
Definition at line 155 of file task.c.
Read result data into a buffer for a task.
Definition at line 160 of file task.c.