~mordred/gearmand/cancel-job

« back to all changes in this revision

Viewing changes to docs/man/gearman_worker_create.3

  • Committer: Brian Aker
  • Date: 2012-05-04 03:46:04 UTC
  • Revision ID: brian@tangent.org-20120504034604-5t22ae4v2o45zjkq
Update for libtest, documentation, and fix for root bzr dir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "GEARMAN_WORKER_CREATE" "3" "April 17, 2012" "0.32" "Gearmand"
 
1
.TH "GEARMAN_WORKER_CREATE" "3" "May 03, 2012" "0.33" "Gearmand"
2
2
.SH NAME
3
3
gearman_worker_create \- Gearmand Documentation, http://gearman.info/
4
4
.
35
35
#include <libgearman/gearman.h>
36
36
.INDENT 0.0
37
37
.TP
38
 
.B gearman_worker_st *gearman_worker_create(gearman_worker_st *client);
39
 
.UNINDENT
40
 
.INDENT 0.0
41
 
.TP
42
 
.B gearman_worker_st *gearman_worker_clone(gearman_worker_st *client, const gearman_worker_st *from);
43
 
.UNINDENT
44
 
.INDENT 0.0
45
 
.TP
46
 
.B void gearman_worker_free(gearman_worker_st *client);
 
38
.B gearman_worker_st *gearman_worker_create(gearman_worker_st\fI\ *client\fP)
 
39
.UNINDENT
 
40
.INDENT 0.0
 
41
.TP
 
42
.B gearman_worker_st *gearman_worker_clone(gearman_worker_st\fI\ *client\fP, const gearman_worker_st\fI\ *from\fP)
 
43
.UNINDENT
 
44
.INDENT 0.0
 
45
.TP
 
46
.B void gearman_worker_free(gearman_worker_st\fI\ *client\fP)
47
47
.UNINDENT
48
48
.sp
49
49
Link with \-lgearman
51
51
.sp
52
52
gearman_worker_create() is used to create a \fBgearman_worker_st\fP  structure that will then
53
53
be used by other libgearman(3) client functions to communicate with the server. You
54
 
should either pass a statically declared \fBgearman_worker_st\fP  to gearman_worker_create() or
 
54
should either pass a statically declared \fBgearman_worker_st\fP  to gearman_worker_create) or
55
55
a NULL. If a NULL passed in then a structure is allocated for you.
56
56
.sp
57
 
\fBgearman_worker_clone()\fP is similar to \fBgearman_worker_create()\fP but it copies the
 
57
\fI\%gearman_worker_clone()\fP is similar to \fI\%gearman_worker_create()\fP but it copies the
58
58
defaults and list of servers from the source \fBgearman_worker_st\fP. If you pass a null as
59
59
the argument for the source to clone, it is the same as a call to gearman_worker_create().
60
60
If the destination argument is NULL a \fBgearman_worker_st\fP  will be allocated for you.
61
61
.sp
62
62
To clean up memory associated with a \fBgearman_worker_st\fP  structure you should pass
63
 
it to \fBgearman_worker_free()\fP when you are finished using it. \fBgearman_worker_free()\fP is
 
63
it to \fI\%gearman_worker_free()\fP when you are finished using it. \fI\%gearman_worker_free\fP is
64
64
the only way to make sure all memory is deallocated when you finish using
65
65
the structure.
66
66
.sp
67
 
You may wish to avoid using \fBgearman_worker_create()\fP or \fBgearman_worker_clone()\fP with a
 
67
You may wish to avoid using \fI\%gearman_worker_create()\fP or \fI\%gearman_worker_clone()\fP with a
68
68
stack based allocation, ie the first parameter. The most common issues related to ABI safety involve
69
69
heap allocated structures.
70
70
.SH RETURN VALUE
71
71
.sp
72
 
\fBgearman_worker_create()\fP returns a pointer to the \fBgearman_worker_st\fP that was created
 
72
\fI\%gearman_worker_create()\fP returns a pointer to the \fBgearman_worker_st\fP that was created
73
73
(or initialized). On an allocation failure, it returns NULL.
74
74
.sp
75
 
\fBgearman_worker_clone()\fP returns a pointer to the \fBgearman_worker_st\fP that was created
 
75
\fI\%gearman_worker_clone()\fP returns a pointer to the \fBgearman_worker_st\fP that was created
76
76
(or initialized). On an allocation failure, it returns NULL.
77
77
.SH HOME
78
78
.sp