File: gearman_worker_timeout.3

package info (click to toggle)
gearmand 0.33-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,396 kB
  • sloc: cpp: 32,756; sh: 11,771; ansic: 4,962; makefile: 102
file content (133 lines) | stat: -rw-r--r-- 4,391 bytes parent folder | download
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.TH "GEARMAN_WORKER_TIMEOUT" "3" "May 04, 2012" "0.33" "Gearmand"
.SH NAME
gearman_worker_timeout \- 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_worker_st
.UNINDENT
.INDENT 0.0
.TP
.B gearman_worker_set_task_context_free_fn
.UNINDENT
.INDENT 0.0
.TP
.B int gearman_worker_timeout(\fI\%gearman_worker_st\fP\fI\ *worker\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void gearman_worker_set_timeout(\fI\%gearman_worker_st\fP\fI\ *worker\fP, int\fI\ timeout\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void *gearman_worker_context(const \fI\%gearman_worker_st\fP\fI\ *worker\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void gearman_worker_set_context(\fI\%gearman_worker_st\fP\fI\ *worker\fP, void\fI\ *context\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void gearman_worker_set_workload_malloc_fn(\fI\%gearman_worker_st\fP\fI\ *worker\fP, gearman_malloc_fn\fI\ *function\fP, void\fI\ *context\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void gearman_worker_set_workload_free_fn(\fI\%gearman_worker_st\fP\fI\ *worker\fP, gearman_free_fn\fI\ *function\fP, void\fI\ *context\fP)
.UNINDENT
.INDENT 0.0
.TP
.B gearman_return_t gearman_worker_wait(\fI\%gearman_worker_st\fP\fI\ *worker\fP)
.UNINDENT
.INDENT 0.0
.TP
.B gearman_return_t gearman_worker_register(\fI\%gearman_worker_st\fP\fI\ *worker\fP, const char\fI\ *function_name\fP, uint32_t\fI\ timeout\fP)
.UNINDENT
.INDENT 0.0
.TP
.B gearman_return_t gearman_worker_unregister(\fI\%gearman_worker_st\fP\fI\ *worker\fP, const char\fI\ *function_name\fP)
.UNINDENT
.INDENT 0.0
.TP
.B gearman_return_t gearman_worker_unregister_all(\fI\%gearman_worker_st\fP\fI\ *worker\fP)
.UNINDENT
.INDENT 0.0
.TP
.B gearman_job_st *gearman_worker_grab_job(\fI\%gearman_worker_st\fP\fI\ *worker\fP, gearman_job_st\fI\ *job\fP, gearman_return_t\fI\ *ret_ptr\fP)
.UNINDENT
.INDENT 0.0
.TP
.B void gearman_job_free_all(\fI\%gearman_worker_st\fP\fI\ *worker\fP)
.UNINDENT
.INDENT 0.0
.TP
.B bool gearman_worker_function_exist(\fI\%gearman_worker_st\fP\fI\ *worker\fP, const char\fI\ *function_name\fP, size_t\fI\ function_length\fP)
.UNINDENT
.INDENT 0.0
.TP
.B gearman_return_t gearman_worker_work(\fI\%gearman_worker_st\fP\fI\ *worker\fP)
.UNINDENT
.sp
Link with \-lgearman
.SH DESCRIPTION
.sp
\fI\%gearman_worker_st\fP is used for worker communication with the server.
.sp
\fI\%gearman_worker_context()\fP and \fI\%gearman_worker_set_context()\fP can be used to store an arbitrary object for the user.
.sp
\fI\%gearman_worker_set_task_context_free_fn()\fP sets a trigger that will be called when a \fBgearman_task_st\fP is released.
.sp
\fI\%gearman_worker_timeout()\fP and \fI\%gearman_worker_set_timeout()\fP get and set the current timeout value, in milliseconds, for the worker.
.sp
\fI\%gearman_worker_function_exist()\fP is used to determine if a given worker has a specific function.
.sp
Normally \fImalloc(3)\fP and \fIfree(3)\fP are used for allocation and releasing workloads. \fI\%gearman_worker_set_workload_malloc_fn()\fP and \fI\%gearman_worker_set_workload_free_fn()\fP can be used to replace these with custom functions.
.sp
If you need to remove a function from the server you can call either \fI\%gearman_worker_unregister_all()\fP to remove all functions that the worker has told the \fBgearmand\fP server about, or you can use \fI\%gearman_worker_unregister()\fP to remove just a single function.
.SH RETURN
.sp
Various
.SH HOME
.sp
To find out more information please check:
\fI\%http://gearman.info/\fP
.SH SEE ALSO
.sp
\fIgearmand(8)\fP \fIlibgearman(3)\fP
.SH AUTHOR
Data Differential http://www.datadifferential.com/
.SH COPYRIGHT
2012, Data Differential, http://www.datadifferential.com/
.\" Generated by docutils manpage writer.
.\" 
.