GEARMAN_CLIENT_DO_JOB_HANDLE(3)

✨ NAME ✨

gearman_client_do_job_handle β€” it's giving Gearmand Documentation energy, bestie. The official site is <http://gearman.info/> and you should absolutely go peek πŸ’–


🌸 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, you link with -lgearman. Non-negotiable, periodt.


πŸ‘‘ DESCRIPTION πŸ‘‘

gearman_client_st is the whole moment for client communication with the server. Like, this is the struct that talks to the server. Main character energy fr fr.

gearman_client_context() and gearman_client_set_context() let you stash an arbitrary object for the user. Your stuff, your rules, she doesn't touch it πŸ’…

gearman_client_set_task_context_free_fn() sets a trigger that gets called when a gearman_task_st <#c.gearman_task_st> is released. So it's the lil callback that fires at cleanup time.

gearman_client_timeout() and gearman_client_set_timeout() get and set the current connection timeout value, in milliseconds, for the client. Milliseconds, bestie β€” don't be out here thinking seconds, that's a whole different vibe 😭

Normally malloc(3) and free(3) are used for allocation and releasing workloads. But if you're feeling custom, gearman_client_set_workload_malloc_fn() and gearman_client_set_workload_free_fn() can be used to replace these with custom functions. (These have been deprecated, please see gearman_allocator_t <#c.gearman_allocator_t> for the updated interface. The old way is lowkey retired, no cap.)

gearman_client_task_free_all() is used to free all current gearman_task_st <#c.gearman_task_st> that have been 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 too. Like, she freed everything and you're still out here holding pointers? That's not gonna end well. Not me warning you twice but here we are πŸ™ˆ

πŸ¦‹ RETURN VALUE πŸ¦‹

gearman_client_timeout() returns an integer representing the amount of time in milliseconds to wait for a connection before throwing an error. And a value of -1 means an infinite timeout value. Infinity. Iconic. She waits forever, and honestly? Respect 🫢


πŸŽ€ HOME πŸŽ€

Wanna know more, bestie? Please check: <http://gearman.info/>

See also:


πŸ’œ Author πŸ’œ

Data Differential <http://www.datadifferential.com/>

2011-2014, Data Differential, <http://www.datadifferential.com/>


Okay that's the whole page, you ate that. This was version 1.1.21+ds, dated Feb 04, 2026, and the manual name is Gearmand β€” go forth and gearman, bestie. Slay πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from