1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
.TH "GEARMAN_CLIENT_SET_WORKLOAD_FN" "3" "May 04, 2012" "0.33" "Gearmand"
.SH NAME
gearman_client_set_workload_fn \- Gearmand Documentation, http://gearman.info/
.
.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
..
.\" Man page generated from reStructeredText.
.
.SH SYNOPSIS
.sp
#include <libgearman/gearman.h>
.INDENT 0.0
.TP
.B gearman_client_st
.UNINDENT
.INDENT 0.0
.TP
.B gearman_task_context_free_fn
.UNINDENT
.INDENT 0.0
.TP
.B int gearman_client_timeout(\fI\%gearman_client_st\fP\fI\ *client\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void gearman_client_set_timeout(\fI\%gearman_client_st\fP\fI\ *client\fP, int\fI\ timeout\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void *gearman_client_context(const \fI\%gearman_client_st\fP\fI\ *client\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void gearman_client_set_context(\fI\%gearman_client_st\fP\fI\ *client\fP, void\fI\ *context\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void gearman_client_set_workload_malloc_fn(\fI\%gearman_client_st\fP\fI\ *client\fP, gearman_malloc_fn\fI\ *function\fP, void\fI\ *context\fP)
.UNINDENT
.sp
Deprecated since version 0.23: Use \fBgearman_allocator_t\fP
.INDENT 0.0
.TP
.B void gearman_client_set_workload_free_fn(\fI\%gearman_client_st\fP\fI\ *client\fP, gearman_free_fn\fI\ *function\fP, void\fI\ *context\fP)
.UNINDENT
.sp
Deprecated since version 0.23: Use \fBgearman_allocator_t\fP
.INDENT 0.0
.TP
.B void gearman_client_task_free_all(\fI\%gearman_client_st\fP\fI\ *client\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void gearman_client_set_task_context_free_fn(\fI\%gearman_client_st\fP\fI\ *client\fP, \fI\%gearman_task_context_free_fn\fP\fI\ *function\fP)
.UNINDENT
.sp
Link with \-lgearman
.SH DESCRIPTION
.sp
\fI\%gearman_client_st\fP is used for \fIclient\fP communication with the server.
.sp
\fI\%gearman_client_context()\fP and \fI\%gearman_client_set_context()\fP can be used to store an arbitrary object for the user.
.sp
\fI\%gearman_client_set_task_context_free_fn()\fP sets a trigger that will be called when a \fBgearman_task_st\fP is released.
.sp
\fI\%gearman_client_timeout()\fP and \fI\%gearman_client_set_timeout()\fP get and set the current timeout value, in milliseconds, for the client.
.sp
Normally \fImalloc(3)\fP and \fIfree(3)\fP are used for allocation and releasing workloads. \fI\%gearman_client_set_workload_malloc_fn()\fP and \fI\%gearman_client_set_workload_free_fn()\fP can be used to replace these with custom functions. (These have been deprecated, please see \fBgearman_allocator_t\fP for the updated interface.
.sp
\fI\%gearman_client_task_free_all()\fP is used to free all current \fBgearman_task_st\fP that have been created with the \fI\%gearman_client_st\fP.
.IP Warning
By calling \fI\%gearman_client_task_free_all()\fP you can end up with a SEGFAULT if you try to use any \fBgearman_task_st\fP that you have kept pointers too.
.RE
.SH RETURN VALUE
.sp
\fI\%gearman_client_timeout()\fP returns an integer representing the amount of time in milliseconds. A value of \-1 means an infinite timeout value. See \fIpoll(3)\fP for more details.
.SH HOME
.sp
To find out more information please check:
\fI\%http://gearman.info/\fP
.IP "See also"
.sp
\fIgearmand(8)\fP \fIlibgearman(3)\fP \fIgearman_client_create(3)\fP
.RE
.SH AUTHOR
Data Differential http://www.datadifferential.com/
.SH COPYRIGHT
2012, Data Differential, http://www.datadifferential.com/
.\" Generated by docutils manpage writer.
.\"
.
|