.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "GEARMAN_TASK_FUNCTION_NAME" "3" "Jan 31, 2024" "1.1.20+ds" "Gearmand" .SH NAME gearman_task_function_name \- Gearmand Documentation, http://gearman.info/ .SH SYNOPSIS .sp #include .INDENT 0.0 .TP .B type gearman_task_st .UNINDENT .INDENT 0.0 .TP .B void gearman_task_free(\fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B void *gearman_task_context(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B void gearman_task_set_context(\fI\%gearman_task_st\fP *task, void *context) .UNINDENT .INDENT 0.0 .TP .B const char *gearman_task_function_name(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B const char *gearman_task_unique(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B const char *gearman_task_job_handle(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B bool gearman_task_is_known(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B bool gearman_task_is_running(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B \fI\%uint32_t\fP gearman_task_numerator(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B \fI\%uint32_t\fP gearman_task_denominator(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B void gearman_task_give_workload(\fI\%gearman_task_st\fP *task, const void *workload, \fI\%size_t\fP workload_size) .UNINDENT .INDENT 0.0 .TP .B \fI\%size_t\fP gearman_task_send_workload(\fI\%gearman_task_st\fP *task, const void *workload, \fI\%size_t\fP workload_size, \fI\%gearman_return_t\fP *ret_ptr) .UNINDENT .INDENT 0.0 .TP .B const void *gearman_task_data(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B \fI\%size_t\fP gearman_task_data_size(const \fI\%gearman_task_st\fP *task) .UNINDENT .INDENT 0.0 .TP .B void *gearman_task_take_data(\fI\%gearman_task_st\fP *task, \fI\%size_t\fP *data_size) .UNINDENT .INDENT 0.0 .TP .B \fI\%size_t\fP gearman_task_recv_data(\fI\%gearman_task_st\fP *task, void *data, \fI\%size_t\fP data_size, \fI\%gearman_return_t\fP *ret_ptr) .UNINDENT .INDENT 0.0 .TP .B const char *gearman_task_error(const \fI\%gearman_task_st\fP *task) .UNINDENT .sp New in version 0.21. .INDENT 0.0 .TP .B \fI\%gearman_return_t\fP gearman_task_return(const \fI\%gearman_task_st\fP *task) .UNINDENT .sp New in version 0.21. .sp Link with \-lgearman .SH DESCRIPTION .sp A \fI\%gearman_task_st\fP represents a \fI\%task\fP\&. Work that is sent by a \fI\%client\fP to a gearman server is seen as a task (a \fI\%worker\fP receives a task in the form of a \fI\%job\fP\&. .sp Tasks, i.e. \fI\%gearman_task_st\fP are created by calling either \fI\%gearman_execute()\fP, \fI\%gearman_client_add_task()\fP, or \fI\%gearman_client_add_task_background()\fP\&. .sp \fI\%gearman_client_add_task_status()\fP can also create \fI\%gearman_task_st\fP, these tasks will be used to monitor a previously created \fI\%gearman_task_st\fP\&. .sp \fI\%gearman_task_free()\fP is used to free a task. This only needs to be done if a task was created with a preallocated structure or if you want to clean up the memory of a specific task. .sp \fI\%gearman_task_set_context()\fP sets the given context of the \fI\%gearman_task_st\fP\&. The context can be used to pass information to a \fI\%gearman_task_st\fP\&. .sp \fI\%gearman_task_context()\fP returns the context that was used in the creation of the \fI\%gearman_task_st\fP (or that was set with \fI\%gearman_task_set_context()\fP\&. .sp \fI\%gearman_task_data()\fP returns the current data that has been returned to the task. \fI\%gearman_task_data_size()\fP will give you the size of the value. \fI\%gearman_task_take_data()\fP is the same as \fI\%gearman_task_data()\fP but the value that is returned must be freed by the client (\fBfree(3)\fP). \fI\%gearman_task_recv_data()\fP can be used with pre\-allocated buffers. .sp \fI\%gearman_task_is_known()\fP, \fI\%gearman_task_is_running()\fP, \fI\%gearman_task_numerator()\fP, and \fI\%gearman_task_denominator()\fP, return values related to the last status update that was made to the \fI\%gearman_task_st\fP\&. They do not cause the \fI\%gearman_task_st\fP to update itself. .sp \fI\%gearman_task_error()\fP return the last error message that the \fI\%gearman_task_st\fP encountered. \fI\%gearman_task_return()\fP return the last \fI\%gearman_return_t\fP stored. A value of \fI\%GEARMAN_UNKNOWN_STATE\fP means that the task has not been submitted to server yet, or that no function was available if the job has been submitted. .SH RETURN VALUE .sp Various. Values that are returned by \fI\%gearman_task_take_data()\fP must have \fBfree(3)\fP called on them. .SH HOME .sp To find out more information please check: \fI\%http://gearman.info/\fP .SH SEE ALSO .sp \fBgearmand(8)\fP \fBlibgearman(3)\fP .SH AUTHOR Data Differential http://www.datadifferential.com/ .SH COPYRIGHT 2011-2024, Data Differential, http://www.datadifferential.com/ .\" Generated by docutils manpage writer. .