GEARMAN_WORKER_UNREGISTER(3)
β¨ GEARMAN_WORKER_UNREGISTER β¨
okay bestie, welcome to the gearmand docs π this whole page lives in the Gearmand Documentation universe over at http://gearman.info/, and it's basically the group chat for getting your worker to unregister stuff. no cap, let's go π¦
π NAME π
gearman_worker_unregister β Gearmand Documentation, http://gearman.info/ π
πΈ SYNOPSIS πΈ
#include <libgearman/gearman.h>
type gearman_worker_st
type gearman_worker_set_task_context_free_fn
int gearman_worker_timeout(gearman_worker_st *worker)
void gearman_worker_set_timeout(gearman_worker_st *worker, int timeout)
void *gearman_worker_context(const gearman_worker_st *worker)
void gearman_worker_set_context(gearman_worker_st *worker, void
*context)
void gearman_worker_set_workload_malloc_fn(gearman_worker_st *worker,
gearman_malloc_fn <#c.gearman_malloc_fn> *function, void *context)
void gearman_worker_set_workload_free_fn(gearman_worker_st *worker,
gearman_free_fn <#c.gearman_free_fn> *function, void *context)
gearman_return_t <#c.gearman_return_t>
gearman_worker_wait(gearman_worker_st *worker)
gearman_return_t <#c.gearman_return_t>
gearman_worker_register(gearman_worker_st *worker, const char
*function_name, uint32_t <#c.uint32_t> timeout)
gearman_return_t <#c.gearman_return_t>
gearman_worker_unregister(gearman_worker_st *worker, const char
*function_name)
gearman_return_t <#c.gearman_return_t>
gearman_worker_unregister_all(gearman_worker_st *worker)
void gearman_job_free_all(gearman_worker_st *worker)
bool gearman_worker_function_exist(gearman_worker_st *worker, const char
*function_name, size_t <#c.size_t> function_length)
gearman_return_t <#c.gearman_return_t>
gearman_worker_work(gearman_worker_st *worker)
gearman_job_st <#c.gearman_job_st>
*gearman_worker_grab_job(gearman_worker_st *worker, gearman_job_st <#c
.gearman_job_st> *job, gearman_return_t <#c.gearman_return_t> *ret_ptr)
and when you build it, you link with -lgearman π periodt
π DESCRIPTION π
gearman_worker_st is the whole vibe for a worker talking to the server. it's the main character π«Ά
gearman_worker_context() and gearman_worker_set_context() are your little storage locker β you can use them to stash an arbitrary object for the user. do whatever you want with it, bestie, it's yours β¨
gearman_worker_set_task_context_free_fn() sets up a trigger that gets called when a gearman_task_st <#c.gearman_task_st> is released. it's giving "cleanup duty but make it a callback" π
gearman_worker_timeout() and gearman_worker_set_timeout() get and set the current timeout value for the worker, measured in milliseconds β±οΈ
gearman_worker_function_exist() is how you find out if a given worker has a specific function. yes/no, iconic, no guesswork π₯
gearman_worker_work() makes the worker go execute against jobs until an error occurs. it just keeps going and going π absolute hustle energy.
gearman_worker_grab_job() takes a job from one of the job servers. big important thing: it is the responsibility of the caller to free the job once they are done. don't leave that job hanging, that's not the vibe π also β this interface is used in testing, and it is very rarely the correct interface to program against. so like, respect it, but know it's a niche queen π
normally malloc(3) and free(3) handle allocation and releasing workloads. but gearman_worker_set_workload_malloc_fn() and gearman_worker_set_workload_free_fn() let you swap those out for custom functions of your own. custom everything, honestly β¨
so if you need to remove a function from the server, you've got two paths, bestie:
- call
gearman_worker_unregister_all()to remove all functions that the worker has told the gearmand server about π§Ή - or use
gearman_worker_unregister()to remove just a single function π―
pick your fighter π
π RETURN π
Various πΈ (yeah. various. it's giving mystery. we don't elaborate and neither does the page, and that's on the docs.)
π¦ HOME π¦
want the tea, the full lore, more info? go check it out here: http://gearman.info/ β
π SEE ALSO π
πΈ Author πΈ
Data Differential http://www.datadifferential.com/ π
πΈ Copyright πΈ
2011-2014, Data Differential, http://www.datadifferential.com/ π
okay that's the whole page, you ate it, slay π this was GEARMAN_WORKER_UNREGISTER(3) from the Gearmand crew, version 1.1.21+ds, dated Feb 04, 2026 β mwah, go unregister something πβ¨
π¦ 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