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 callinggearman_client_task_free_all()you can end up with a SEGFAULT if you try to use anygearman_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/>
Β© Copyright
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
- 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