GEARMAN_CLIENT_ADD_TASK_HIGH(3)

✨ NAME ✨

gearman_client_add_task_high β€” Gearmand Documentation, http://gearman.info/

okay bestie, this is the Gearmand page for gearhman_client_add_task_high πŸ’… no wait, gearman_client_add_task_high, I got excited. It's a libgearman thing, it's giving queue-queen energy πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libgearman/gearman.h>

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)

Link with -lgearman 🫢


πŸ’– DESCRIPTION πŸ’–

So gearman_client_add_task() does exactly what it says on the tin, bestie β€” it creates a task and adds it to the given gearman_client_st <#c.gearman_client_st>. That's the whole assignment. Manifesting it into existence ✨

But here's the plot twist: the task does NOT start running until you call gearman_client_run_tasks() <#c.gearman_client_run_tasks>. It's just sitting there. Waiting. Main character energy, but like, on pause πŸ’€

If the unique value is not set, then a unique will be assigned. Don't stress about it, it gets a name, it gets an identity, slay πŸŽ€

And now the actual stars of this page: gearman_client_add_task_high() and gearman_client_add_task_low() are 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 difference. Same function, different vibe check on the priority πŸ“Š


🫢 RETURN VALUE 🫢

The gearman_task_st <#c.gearman_task_st> gets created, and a pointer to it comes back to you. Iconic. Obsessed πŸ’–

But on error β€” and yes, sometimes things go wrong, we don't gatekeep reality β€” NULL is returned and ret_ptr is set with a gearman_return_t <#c.gearman_return_t>. So check your ret_ptr, bestie, it's telling you what happened 😭


🌈 HOME 🌈

To find out more information please check: <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, no cap 🧚 this was 1.1.21+ds, dated Feb 04, 2026, straight from the GEARMAN_CLIENT_ADD_TASK_HIGH(3) Gearmand manual β€” love that for us, byeee πŸ¦‹πŸ’…πŸŒΈ

πŸ“¦ where this page comes from