GEARMAN_CLIENT_ADD_TASK_LOW(3)
π gearman_client_add_task_low β the low-priority task-adder girlies know
okay so bestie, this one lives in the Gearmand manual, section 3, and it's your girl gearman_client_add_task_low(3). yes the name is long. yes she's worth it. π
β¨ NAME β¨
gearman_client_add_task_low β Gearmand Documentation, <http://gearman.info/>
like literally that's the whole name section, she's a documented girlie and she knows it π¦
β¨ SYNOPSIS β¨
first things first, you gotta pull in the header:
#include <libgearman/gearman.h>
then here's the trio of task-adders, all dripped out in their exact signatures (yes the little <#c.β¦> breadcrumbs are part of the manpage, I'm not touching them, they're vintage π
):
gearman_task_st <#c.gearman_task_st>
*gearman_client_add_task(gearman_client_st <#c.gearman_client_st>
*client, gearman_task_st <#c.gearman_task_st> *task, void *context,
const char *function_name, const char *unique, const void *workload,
size_t <#c.size_t> workload_size, gearman_return_t <#c.gearman_return_t>
*ret_ptr)
gearman_task_st <#c.gearman_task_st>
*gearman_client_add_task_high(gearman_client_st <#c.gearman_client_st>
*client, gearman_task_st <#c.gearman_task_st> *task, void *context,
const char *function_name, const char *unique, const void *workload,
size_t <#c.size_t> workload_size, gearman_return_t <#c.gearman_return_t>
*ret_ptr)
gearman_task_st <#c.gearman_task_st>
*gearman_client_add_task_low(gearman_client_st <#c.gearman_client_st>
*client, gearman_task_st <#c.gearman_task_st> *task, void *context,
const char *function_name, const char *unique, const void *workload,
size_t <#c.size_t> workload_size, gearman_return_t <#c.gearman_return_t>
*ret_ptr)
and when you link her, you link her like this β don't forget, no cap:
-lgearman
β¨ DESCRIPTION β¨
okay so here's the tea. π
gearman_client_add_task() makes a task and drops it into the gearman_client_st <#c.gearman_client_st> you hand her. and here's the important part, bestie, do not skip this: the task does not start running the second you add it. like, she's added, she's chilling, nothing is happening yet. execution doesn't kick off until gearman_client_run_tasks() <#c.gearman_client_run_tasks> gets called. periodt. π₯
if the unique value is not set, then a unique will be assigned. so the universe just hooks you up with one, iconic behaviour honestly π
and gearman_client_add_task_high() and gearman_client_add_task_low()? they're identical to gearman_client_do() <#c.gearman_client_do>, only they set the priority to either high or low. that's it, that's the whole diff. the way that's the entire distinctionβ¦ π
β¨ RETURN VALUE β¨
the gearman_task_st <#c.gearman_task_st> gets created, and you get a pointer to it back. slay. π«Ά
but if it goes wrong? NULL gets returned, and ret_ptr gets set with a gearman_return_t <#c.gearman_return_t>. so always check your ret_ptr, bestie, always π
β¨ HOME β¨
want more lore? go check out: <http://gearman.info/>
see also, aka the friend group:
β¨ 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 π and just so we're giving credit where credit is due: this beauty is from the 1.1.21+ds edition, dated Feb 04, 2026. go forth and add your tasks, low priority but highkey iconic. πΈβ¨
π¦ 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