1GEARMAN_WORKER_SET_WORKLOAD_FREE_FN(G3e)armaGnEdARMAN_WORKER_SET_WORKLOAD_FREE_FN(3)
2
3
4

NAME

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

SYNOPSIS

10       #include <libgearman/gearman.h>
11
12       type gearman_worker_st
13
14       type gearman_worker_set_task_context_free_fn
15
16       int gearman_worker_timeout(gearman_worker_st *worker)
17
18       void gearman_worker_set_timeout(gearman_worker_st *worker, int timeout)
19
20       void *gearman_worker_context(const gearman_worker_st *worker)
21
22       void gearman_worker_set_context(gearman_worker_st *worker,  void  *con‐
23       text)
24
25       void  gearman_worker_set_workload_malloc_fn(gearman_worker_st  *worker,
26       gearman_malloc_fn *function, void *context)
27
28       void   gearman_worker_set_workload_free_fn(gearman_worker_st   *worker,
29       gearman_free_fn *function, void *context)
30
31       gearman_return_t gearman_worker_wait(gearman_worker_st *worker)
32
33       gearman_return_t   gearman_worker_register(gearman_worker_st   *worker,
34       const char *function_name, uint32_t timeout)
35
36       gearman_return_t  gearman_worker_unregister(gearman_worker_st  *worker,
37       const char *function_name)
38
39       gearman_return_t        gearman_worker_unregister_all(gearman_worker_st
40       *worker)
41
42       void gearman_job_free_all(gearman_worker_st *worker)
43
44       bool  gearman_worker_function_exist(gearman_worker_st  *worker,   const
45       char *function_name, size_t function_length)
46
47       gearman_return_t gearman_worker_work(gearman_worker_st *worker)
48
49       gearman_job_st    *gearman_worker_grab_job(gearman_worker_st   *worker,
50       gearman_job_st *job, gearman_return_t *ret_ptr)
51
52       Link with -lgearman
53

DESCRIPTION

55       gearman_worker_st is used for worker communication with the server.
56
57       gearman_worker_context() and gearman_worker_set_context() can  be  used
58       to store an arbitrary object for the user.
59
60       gearman_worker_set_task_context_free_fn()  sets  a trigger that will be
61       called when a gearman_task_st is released.
62
63       gearman_worker_timeout() and gearman_worker_set_timeout() get  and  set
64       the current timeout value, in milliseconds, for the worker.
65
66       gearman_worker_function_exist()  is used to determine if a given worker
67       has a specific function.
68
69       gearman_worker_work() have the worker execute against jobs until an er‐
70       ror occurs.
71
72       gearman_worker_grab_job()  Takes  a job from one of the job servers. It
73       is the responsibility of the caller to free the job once they are done.
74       This  interface  is used in testing, and is very rarely the correct in‐
75       terface to program against.
76
77       Normally malloc(3) and free(3) are used for  allocation  and  releasing
78       workloads.          gearman_worker_set_workload_malloc_fn()         and
79       gearman_worker_set_workload_free_fn() can be used to replace these with
80       custom functions.
81
82       If  you  need  to remove a function from the server you can call either
83       gearman_worker_unregister_all() to remove all functions that the worker
84       has    told    the    gearmand   server   about,   or   you   can   use
85       gearman_worker_unregister() to remove just a single function.
86

RETURN

88       Various
89

HOME

91       To find out more information please check: http://gearman.info/
92

SEE ALSO

94       gearmand(8) libgearman(3)
95

AUTHOR

97       Data Differential http://www.datadifferential.com/
98
100       2011-2014, Data Differential, http://www.datadifferential.com/
101
102
103
104
1051.1.20                           Nov 19,G2E0A2R2MAN_WORKER_SET_WORKLOAD_FREE_FN(3)
Impressum