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/ πŸ’œ

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