GEARMAN_CLIENT_SET_TIMEOUT(3)

πŸ’– GEARMAN_CLIENT_SET_TIMEOUT πŸ’–

okay bestie, welcome to the Gearmand manual page for gearman_client_set_timeout ✨ β€” the docs live over at http://gearman.info/ and yes we are reading them together, grab a snack πŸ“


✨ NAME ✨

gearman_client_set_timeout β€” Gearmand Documentation, http://gearman.info/ πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libgearman/gearman.h>

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 <#c.gearman_malloc_fn> *function, void *context)

Deprecated since version 0.23: Use gearman_allocator_t <#c
.gearman_allocator_t>

void gearman_client_set_workload_free_fn(gearman_client_st *client,
gearman_free_fn <#c.gearman_free_fn> *function, void *context)

Deprecated since version 0.23: Use gearman_allocator_t <#c
.gearman_allocator_t>

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)

and when you link it: -lgearman πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

so gearman_client_st is the whole vibe for client communication with the server. it's giving main character energy, it's literally how you talk to the server fr fr 🫢

gearman_client_context() and gearman_client_set_context() are your little storage cubbies β€” use them to stash an arbitrary object for the user ✨

gearman_client_set_task_context_free_fn() sets a trigger that gets called when a gearman_task_st <#c.gearman_task_st> is released. like a little goodbye party for your task πŸŽ‰ no cap.

gearman_client_timeout() and gearman_client_set_timeout() get and set the current connection timeout value, in milliseconds, for the client. yep, milliseconds, count them carefully, bestie ⏱️

normally malloc(3) and free(3) handle allocation and releasing workloads. gearman_client_set_workload_malloc_fn() and gearman_client_set_workload_free_fn() let you swap those out for your own custom functions. BUT β€” these have been deprecated, please see gearman_allocator_t <#c.gearman_allocator_t> for the updated interface πŸ‘€ the new interface ate, the old one is retired periodt.

gearman_client_task_free_all() frees all the current gearman_task_st <#c.gearman_task_st> that were created with the gearman_client_st 🧹✨

⚠️ Warning: ⚠️ by calling gearman_client_task_free_all() you can end up with a SEGFAULT πŸ’€ if you try to use any gearman_task_st <#c.gearman_task_st> that you have kept pointers to. dramatic but true, do not do this, i am begging πŸ™ˆ

🌈 RETURN VALUE 🌈

gearman_client_timeout() returns an integer representing the amount of time in milliseconds to wait for a connection before throwing an error. a value of -1 means an infinite timeout value πŸ‘‘ (yes king, wait forever)


πŸŽ€ HOME πŸŽ€

to find out more information please check: http://gearman.info/ ✨

See also:


πŸ’œ Author πŸ’œ

Data Differential http://www.datadifferential.com/ 🫢

2011-2014, Data Differential, http://www.datadifferential.com/ πŸ’–


and that's the whole page bestie, you ate that πŸ“ this was version 1.1.21+ds, dated Feb 04, 2026, brought to you by the Gearmand girlies β€” slay, stay safe, and don't dereference freed task pointers πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from