1GEARMAN_TASK_NUMERATOR(3)          Gearmand          GEARMAN_TASK_NUMERATOR(3)
2
3
4

NAME

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

SYNOPSIS

9       #include <libgearman/gearman.h>
10
11       type gearman_task_st
12
13       void gearman_task_free(gearman_task_st *task)
14
15       void *gearman_task_context(const gearman_task_st *task)
16
17       void gearman_task_set_context(gearman_task_st *task, void *context)
18
19       const char *gearman_task_function_name(const gearman_task_st *task)
20
21       const char *gearman_task_unique(const gearman_task_st *task)
22
23       const char *gearman_task_job_handle(const gearman_task_st *task)
24
25       bool gearman_task_is_known(const gearman_task_st *task)
26
27       bool gearman_task_is_running(const gearman_task_st *task)
28
29       uint32_t gearman_task_numerator(const gearman_task_st *task)
30
31       uint32_t gearman_task_denominator(const gearman_task_st *task)
32
33       void   gearman_task_give_workload(gearman_task_st   *task,  const  void
34       *workload, size_t workload_size)
35
36       size_t  gearman_task_send_workload(gearman_task_st  *task,  const  void
37       *workload, size_t workload_size, gearman_return_t *ret_ptr)
38
39       const void *gearman_task_data(const gearman_task_st *task)
40
41       size_t gearman_task_data_size(const gearman_task_st *task)
42
43       void *gearman_task_take_data(gearman_task_st *task, size_t *data_size)
44
45       size_t gearman_task_recv_data(gearman_task_st *task, void *data, size_t
46       data_size, gearman_return_t *ret_ptr)
47
48       const char *gearman_task_error(const gearman_task_st *task)
49
50       New in version 0.21.
51
52
53       gearman_return_t gearman_task_return(const gearman_task_st *task)
54
55       New in version 0.21.
56
57
58       Link with -lgearman
59

DESCRIPTION

61       A gearman_task_st represents a task.  Work that is sent by a client  to
62       a  gearman  server  is  seen as a task (a worker receives a task in the
63       form of a job.
64
65       Tasks, i.e. gearman_task_st are created by calling either  gearman_exe‐
66       cute(),   gearman_client_add_task(),  or  gearman_client_add_task_back‐
67       ground().
68
69       gearman_client_add_task_status() can also create gearman_task_st, these
70       tasks will be used to monitor a previously created gearman_task_st.
71
72       gearman_task_free()  is used to free a task. This only needs to be done
73       if a task was created with a preallocated structure or if you  want  to
74       clean up the memory of a specific task.
75
76       gearman_task_set_context()    sets    the    given   context   of   the
77       gearman_task_st. The context can be  used  to  pass  information  to  a
78       gearman_task_st.
79
80       gearman_task_context()  returns  the  context that was used in the cre‐
81       ation   of   the   gearman_task_st    (or    that    was    set    with
82       gearman_task_set_context().
83
84       gearman_task_data()  returns the current data that has been returned to
85       the task. gearman_task_data_size() will give you the size of the value.
86       gearman_task_take_data()  is  the  same  as gearman_task_data() but the
87       value  that  is  returned  must  be  freed  by  the  client  (free(3)).
88       gearman_task_recv_data() can be used with pre-allocated buffers.
89
90       gearman_task_is_known(),                     gearman_task_is_running(),
91       gearman_task_numerator(), and gearman_task_denominator(), return values
92       related to the last status update that was made to the gearman_task_st.
93       They do not cause the gearman_task_st to update itself.
94
95       gearman_task_error()  return  the   last   error   message   that   the
96       gearman_task_st  encountered.  gearman_task_return()  return  the  last
97       gearman_return_t stored. A value of  GEARMAN_UNKNOWN_STATE  means  that
98       the  task has not been submitted to server yet, or that no function was
99       available if the job has been submitted.
100

RETURN VALUE

102       Various. Values that are returned by gearman_task_take_data() must have
103       free(3) called on them.
104

HOME

106       To find out more information please check: http://gearman.info/
107

SEE ALSO

109       gearmand(8) libgearman(3)
110

AUTHOR

112       Data Differential http://www.datadifferential.com/
113
115       2011-2014, Data Differential, http://www.datadifferential.com/
116
117
118
119
1201.1.20                           Nov 19, 2022        GEARMAN_TASK_NUMERATOR(3)
Impressum