1GEARMAN_CLIENT_SET_WORKLOAD_FN(3) Gearmand GEARMAN_CLIENT_SET_WORKLOAD_FN(3)
2
3
4
6 gearman_client_set_workload_fn - Gearmand Documentation, http://gear‐
7 man.info/
8
10 #include <libgearman/gearman.h>
11
12 gearman_client_st
13
14 gearman_task_context_free_fn
15
16 int gearman_client_timeout(gearman_client_st *client)
17
18 void gearman_client_set_timeout(gearman_client_st *client, int timeout)
19
20 void *gearman_client_context(const gearman_client_st *client)
21
22 void gearman_client_set_context(gearman_client_st *client, void *con‐
23 text)
24
25 void gearman_client_set_workload_malloc_fn(gearman_client_st *client,
26 gearman_malloc_fn *function, void *context)
27
28 Deprecated since version 0.23: Use gearman_allocator_t
29
30
31 void gearman_client_set_workload_free_fn(gearman_client_st *client,
32 gearman_free_fn *function, void *context)
33
34 Deprecated since version 0.23: Use gearman_allocator_t
35
36
37 void gearman_client_task_free_all(gearman_client_st *client)
38
39 void gearman_client_set_task_context_free_fn(gearman_client_st *client,
40 gearman_task_context_free_fn *function)
41
42 Link with -lgearman
43
45 gearman_client_st is used for client communication with the server.
46
47 gearman_client_context() and gearman_client_set_context() can be used
48 to store an arbitrary object for the user.
49
50 gearman_client_set_task_context_free_fn() sets a trigger that will be
51 called when a gearman_task_st is released.
52
53 gearman_client_timeout() and gearman_client_set_timeout() get and set
54 the current connection timeout value, in milliseconds, for the client.
55
56 Normally malloc(3) and free(3) are used for allocation and releasing
57 workloads. gearman_client_set_workload_malloc_fn() and
58 gearman_client_set_workload_free_fn() can be used to replace these with
59 custom functions. (These have been deprecated, please see gearman_allo‐
60 cator_t for the updated interface.
61
62 gearman_client_task_free_all() is used to free all current gear‐
63 man_task_st that have been created with the gearman_client_st.
64
65 WARNING:
66 By calling gearman_client_task_free_all() you can end up with a SEG‐
67 FAULT if you try to use any gearman_task_st that you have kept
68 pointers too.
69
71 gearman_client_timeout() returns an integer representing the amount of
72 time in milliseconds to wait for a connection before throwing an error.
73 A value of -1 means an infinite timeout value.
74
76 To find out more information please check: http://gearman.info/
77
78 SEE ALSO:
79 gearmand(8) libgearman(3) gearman_client_create(3)
80
82 Data Differential http://www.datadifferential.com/
83
85 2011-2014, Data Differential, http://www.datadifferential.com/
86
87
88
89
901.1.18 December 11, 20G1E7ARMAN_CLIENT_SET_WORKLOAD_FN(3)