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/>


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