.\" 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_WORKER_CLONE" "3" "Jan 06, 2024" "1.1.20+ds" "Gearmand" .SH NAME gearman_worker_clone \- Gearmand Documentation, http://gearman.info/ .SH SYNOPSIS .sp #include .INDENT 0.0 .TP .B \fI\%gearman_worker_st\fP *gearman_worker_create(\fI\%gearman_worker_st\fP *client) .UNINDENT .INDENT 0.0 .TP .B \fI\%gearman_worker_st\fP *gearman_worker_clone(\fI\%gearman_worker_st\fP *client, const \fI\%gearman_worker_st\fP *from) .UNINDENT .INDENT 0.0 .TP .B void gearman_worker_free(\fI\%gearman_worker_st\fP *client) .UNINDENT .sp Link with \-lgearman .SH DESCRIPTION .sp gearman_worker_create() is used to create a \fI\%gearman_worker_st\fP structure that will then be used by other libgearman(3) client functions to communicate with the server. You should either pass a statically declared \fI\%gearman_worker_st\fP to gearman_worker_create) or a NULL. If a NULL passed in then a structure is allocated for you. .sp \fI\%gearman_worker_clone()\fP is similar to \fI\%gearman_worker_create()\fP but it copies the defaults and list of servers from the source \fI\%gearman_worker_st\fP\&. If you pass a null as the argument for the source to clone, it is the same as a call to gearman_worker_create(). If the destination argument is NULL a \fI\%gearman_worker_st\fP will be allocated for you. .sp To clean up memory associated with a \fI\%gearman_worker_st\fP structure you should pass it to \fI\%gearman_worker_free()\fP when you are finished using it. \fI\%gearman_worker_free\fP is the only way to make sure all memory is deallocated when you finish using the structure. .sp You may wish to avoid using \fI\%gearman_worker_create()\fP or \fI\%gearman_worker_clone()\fP with a stack based allocation, ie the first parameter. The most common issues related to ABI safety involve heap allocated structures. .SH RETURN VALUE .sp \fI\%gearman_worker_create()\fP returns a pointer to the \fI\%gearman_worker_st\fP that was created (or initialized). On an allocation failure, it returns NULL. .sp \fI\%gearman_worker_clone()\fP returns a pointer to the \fI\%gearman_worker_st\fP that was created (or initialized). On an allocation failure, it returns NULL. .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. .