1GEARMAN_WORKER_CREATE(3)           Gearmand           GEARMAN_WORKER_CREATE(3)
2
3
4

NAME

6       gearman_worker_create - Gearmand Documentation, http://gearman.info/
7

SYNOPSIS

9       #include <libgearman/gearman.h>
10
11       gearman_worker_st *gearman_worker_create(gearman_worker_st *client)
12
13       gearman_worker_st    *gearman_worker_clone(gearman_worker_st   *client,
14       const gearman_worker_st *from)
15
16       void gearman_worker_free(gearman_worker_st *client)
17
18       Link with -lgearman
19

DESCRIPTION

21       gearman_worker_create() is used to create a  gearman_worker_st   struc‐
22       ture  that will then be used by other libgearman(3) client functions to
23       communicate with the server. You should either pass  a  statically  de‐
24       clared  gearman_worker_st   to  gearman_worker_create)  or a NULL. If a
25       NULL passed in then a structure is allocated for you.
26
27       gearman_worker_clone() is similar  to  gearman_worker_create()  but  it
28       copies  the  defaults  and  list  of  servers  from  the  source  gear‐
29       man_worker_st. If you pass a null as the argument  for  the  source  to
30       clone,  it  is  the  same as a call to gearman_worker_create().  If the
31       destination argument is NULL a gearman_worker_st  will be allocated for
32       you.
33
34       To  clean  up memory associated with a gearman_worker_st  structure you
35       should pass it to gearman_worker_free() when you are finished using it.
36       gearman_worker_free  is the only way to make sure all memory is deallo‐
37       cated when you finish using the structure.
38
39       You   may   wish   to   avoid    using    gearman_worker_create()    or
40       gearman_worker_clone()  with a stack based allocation, ie the first pa‐
41       rameter. The most common issues related to ABI safety involve heap  al‐
42       located structures.
43

RETURN VALUE

45       gearman_worker_create() returns a pointer to the gearman_worker_st that
46       was created (or initialized). On  an  allocation  failure,  it  returns
47       NULL.
48
49       gearman_worker_clone()  returns a pointer to the gearman_worker_st that
50       was created (or initialized). On  an  allocation  failure,  it  returns
51       NULL.
52

HOME

54       To find out more information please check: http://gearman.info/
55
56       SEE ALSO:
57          gearmand(8) libgearman(3) gearman_strerror(3)
58

AUTHOR

60       Data Differential http://www.datadifferential.com/
61
63       2011-2014, Data Differential, http://www.datadifferential.com/
64
65
66
67
681.1.20                           Nov 19, 2022         GEARMAN_WORKER_CREATE(3)
Impressum