.\" 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_CLIENT_DO_BACKGROUND" "3" "Mar 29, 2024" "1.1.20+ds" "Gearmand" .SH NAME gearman_client_do_background \- Gearmand Documentation, http://gearman.info/ .SH SYNOPSIS .sp #include .INDENT 0.0 .TP .B type gearman_priority_t .UNINDENT .INDENT 0.0 .TP .B \fI\%gearman_return_t\fP gearman_client_do_background(\fI\%gearman_client_st\fP *client, const char *function_name, const char *unique, const void *workload, \fI\%size_t\fP workload_size, char *job_handle) .UNINDENT .sp Changed in version 0.21: \fI\%GEARMAN_PAUSE\fP will no longer be returned. A do operation will now run until it has been submitted. .INDENT 0.0 .TP .B \fI\%gearman_return_t\fP gearman_client_do_high_background(\fI\%gearman_client_st\fP *client, const char *function_name, const char *unique, const void *workload, \fI\%size_t\fP workload_size, \fI\%gearman_job_handle_t\fP job_handle) .UNINDENT .INDENT 0.0 .TP .B \fI\%gearman_return_t\fP gearman_client_do_low_background(\fI\%gearman_client_st\fP *client, const char *function_name, const char *unique, const void *workload, \fI\%size_t\fP workload_size, \fI\%gearman_job_handle_t\fP job_handle) .UNINDENT .SH DESCRIPTION .sp \fI\%gearman_client_do_background()\fP executes a single request to the gearmand server and returns the status via \fI\%gearman_return_t\fP\&. .sp \fI\%gearman_client_add_task_high_background()\fP and \fI\%gearman_client_add_task_low_background()\fP are identical to \fI\%gearman_client_do_background()\fP, only they set the \fI\%gearman_priority_t\fP to either high or low. .sp If job_handle is not NULL, it will be populated with the name of the job_handle for the task created. The job handle needs to be the size of \fI\%GEARMAN_JOB_HANDLE_SIZE\fP\&. Please see \fI\%gearman_job_handle_t\fP for more information. .SH RETURN VALUE .sp \fI\%gearman_return_t\fP .SH EXAMPLE .INDENT 0.0 .INDENT 3.5 .sp .EX /* # Gearman server and library # Copyright (C) 2012 Data Differential, http://datadifferential.com/ # All rights reserved. # # Use and distribution licensed under the BSD license. See # the COPYING file in this directory for full text. */ #include #include #include #include int main(void) { gearman_client_st *client= gearman_client_create(NULL); gearman_return_t ret= gearman_client_add_server(client, \(dqlocalhost\(dq, 0); if (gearman_failed(ret)) { return EXIT_FAILURE; } gearman_job_handle_t job_handle; gearman_return_t rc= gearman_client_do_background(client, \(dqreverse_function\(dq, \(dqunique_value\(dq, \(dqmy string to reverse\(dq, strlen(\(dqmy string to reverse\(dq), job_handle); if (gearman_success(rc)) { // Make use of value printf(\(dq%s\en\(dq, job_handle); } gearman_client_free(client); return 0; } .EE .UNINDENT .UNINDENT .SH HOME .sp To find out more information please check: \fI\%http://gearman.info/\fP .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 \fBgearmand(8)\fP \fBlibgearman(3)\fP \fBgearman_strerror(3)\fP .UNINDENT .UNINDENT .SH AUTHOR Data Differential http://www.datadifferential.com/ .SH COPYRIGHT 2011-2024, Data Differential, http://www.datadifferential.com/ .\" Generated by docutils manpage writer. .