The task functions are used to manage tasks being run by clients. They are most commonly used with the client interface.
Options for gearman_task_st.
Definition at line 258 of file constants.h.
| enum gearman_task_state_t |
States for gearman_task_st.
Definition at line 268 of file constants.h.
| void* gearman_task_context | ( | const gearman_task_st * | task | ) |
Get context for a task.
| void gearman_task_set_context | ( | gearman_task_st * | task, | |
| const void * | context | |||
| ) |
Set context for a task.
| const char* gearman_task_function_name | ( | const gearman_task_st * | task | ) |
Get function name associated with a task.
| const char* gearman_task_unique | ( | const gearman_task_st * | task | ) |
Get unique identifier for a task.
| const char* gearman_task_job_handle | ( | const gearman_task_st * | task | ) |
Get job handle for a task.
| bool gearman_task_is_known | ( | const gearman_task_st * | task | ) |
Get status on whether a task is known or not.
| bool gearman_task_is_running | ( | const gearman_task_st * | task | ) |
Get status on whether a task is running or not.
| uint32_t gearman_task_numerator | ( | const gearman_task_st * | task | ) |
Get the numerator of percentage complete for a task.
| uint32_t gearman_task_denominator | ( | const gearman_task_st * | 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.
| size_t gearman_task_send_workload | ( | gearman_task_st * | task, | |
| const void * | workload, | |||
| size_t | workload_size, | |||
| gearman_return_t * | ret_ptr | |||
| ) |
Send packet workload for a task.
| const void* gearman_task_data | ( | const gearman_task_st * | task | ) |
Get result data being returned for a task.
| size_t gearman_task_data_size | ( | const gearman_task_st * | 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.
| size_t gearman_task_recv_data | ( | gearman_task_st * | task, | |
| void * | data, | |||
| size_t | data_size, | |||
| gearman_return_t * | ret_ptr | |||
| ) |
Read result data into a buffer for a task.
1.6.1