GEARMAN_CLIENT_DO_STATUS(3)
π GEARMAN_CLIENT_DO_STATUS π
okay bestie, this is a page out of the Gearmand manual set (yes, the gearmand crew, they're icons), and we're talking about libgearman's client-side status-and-config situation. it's giving "everything you need to poke at a client object without actually doing a job." let's go π«Ά
β¨ SYNOPSIS β¨
first things first, you gotta pull in the header, no cap:
#include <libgearman/gearman.h>
then here's the whole roster of types and functions this page is serving you:
type gearman_client_st
type gearman_task_context_free_fn
int gearman_client_timeout(gearman_client_st *client)
void gearman_client_set_timeout(gearman_client_st *client, int timeout)
void *gearman_client_context(const gearman_client_st *client)
void gearman_client_set_context(gearman_client_st *client, void *context)
void gearman_client_set_workload_malloc_fn(gearman_client_st *client, gearman_malloc_fn *function, void *context)
void gearman_client_set_workload_free_fn(gearman_client_st *client, gearman_free_fn *function, void *context)
void gearman_client_task_free_all(gearman_client_st *client)
void gearman_client_set_task_context_free_fn(gearman_client_st *client, gearman_task_context_free_fn *function)
β οΈ heads up babes: bothgearman_client_set_workload_malloc_fn()andgearman_client_set_workload_free_fn()are Deprecated since version 0.23. usegearman_allocator_tinstead, mwah π
and when you link, don't forget:
-lgearman
πΈ DESCRIPTION πΈ
so gearman_client_st is the whole vibe for client communication with the server. it's the main character of this page, fr fr.
gearman_client_context() and gearman_client_set_context() are your little storage cubbies π β you can use them to stash an arbitrary object for the user. whatever you wanna keep around, it lives there.
gearman_client_set_task_context_free_fn() sets a trigger β think of it like a little alarm that goes off when a gearman_task_st is released. very "notify me when it's over" energy β¨
gearman_client_timeout() and gearman_client_set_timeout() get and set the current connection timeout value, in milliseconds, for the client. tiny numbers, big consequences π
normally malloc(3) and free(3) are the ones doing the allocation and releasing of workloads β the originals, the classics. but gearman_client_set_workload_malloc_fn() and gearman_client_set_workload_free_fn() can swap those out for your own custom functions instead. however β these have been deprecated, so please go look at gearman_allocator_t for the updated interface, i'm begging π₯Ί
gearman_client_task_free_all() frees all the current gearman_task_st that were created with the gearman_client_st. all of them. every last one. periodt.
β οΈ Warning: by callinggearman_client_task_free_all()you can end up with a SEGFAULT ππ if you then try to use anygearman_task_stthat you kept pointers to. like, they're gone now. do not touch. do not pass go. do not dereference. this is not a drill, bestie π
π¦ RETURN VALUE π¦
gearman_client_timeout() returns an integer β how long, in milliseconds, to wait for a connection before throwing an error. and if you get a value of -1? that means an infinite timeout value. forever and ever, amen βΎοΈβ¨
π HOME π
wanna know more, boo? go check out: <http://gearman.info/>
See also:
π Author π
Data Differential <http://www.datadifferential.com/>
π Copyright π
2011-2014, Data Differential, <http://www.datadifferential.com/>
that's the whole page, babe!! π this was Gearmand version 1.1.21+ds, dated Feb 04, 2026, and the page is GEARMAN_CLIENT_DO_STATUS(3) β go forth and configure your clients responsibly πβ¨π¦
π¦ where this page comes from
- ubuntu resolute: libgearman-dev 1.1.21+ds-1ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libgearman-dev 1.1.21+ds-1ubuntu3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms