GEARMAN_CLIENT_TASK_FREE_ALL(3)

✨ GEARMAN_CLIENT_TASK_FREE_ALL ✨

okay bestie, gather round 🫢 this is the Gearmand manual, section 3, and we're talking about the whole gearman_client family β€” mostly that one chaotic function that frees ALL your tasks at once. buckle up πŸ’…


πŸ“– NAME

gearman_client_task_free_all β€” 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 bestie, don't forget: link with -lgearman πŸ”—


πŸ’– DESCRIPTION

gearman_client_st is the struct you use for client <#term-client> communication with the server. it's giving main character energy for every client-side thing you do πŸ’«

gearman_client_context() and gearman_client_set_context() let you stash an arbitrary object for the user. like a little pocket for your own stuff πŸŽ€

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 when your task dips out, this lil callback runs πŸ¦‹

gearman_client_timeout() and gearman_client_set_timeout() get and set the current connection timeout value, in milliseconds, for the client. no cap, it's milliseconds ⏱️

normally malloc(3) and free(3) are used for allocation and releasing workloads. gearman_client_set_workload_malloc_fn() and gearman_client_set_workload_free_fn() can be used to replace these with custom functions. ⚠️ but heads up β€” these have been deprecated, please see gearman_allocator_t <#c.gearman_allocator_t> for the updated interface πŸ™ˆ

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. it's the "clean up literally everything" button 🧹✨

⚠️ 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 fr fr, if you kept a pointer to a task and then nuked them all, that pointer is now haunted. do not touch it. it will not survive the vibe check 😭


πŸ” 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 ♾️


🏠 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 πŸ’… this was Gearmand manual, version 1.1.21+ds, dated Feb 04, 2026 β€” slay, go forth and free your tasks responsibly 🫢✨ </🌸>

πŸ“¦ where this page comes from