GEARMAN_JOB_FREE(3)
π GEARMAN_JOB_FREE π
okay so bestie, we're deep in the Gearmand docs rn β this is page gearman_job_free(3) from section 3 of the Gearmand manual, and the whole doc situation lives over at http://gearman.info/ (that's literally the NAME, no cap). π«Ά
β¨ NAME β¨
gearman_job_free β Gearmand Documentation, http://gearman.info/ πΈ
β¨ SYNOPSIS β¨
lowkey the receipts first, here's the whole vibe, verbatim:
#include <libgearman/gearman.h>
type gearman_job_st
void gearman_job_free(gearman_job_st *job)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_data(gearman_job_st *job, const void *data, size_t <#c
.size_t> data_size)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_warning(gearman_job_st *job, const void *warning,
size_t <#c.size_t> warning_size)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_status(gearman_job_st *job, uint32_t <#c.uint32_t>
numerator, uint32_t <#c.uint32_t> denominator)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_complete(gearman_job_st *job, const void *result,
size_t <#c.size_t> result_size)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_exception(gearman_job_st *job, const void *exception,
size_t <#c.size_t> exception_size)
gearman_return_t <#c.gearman_return_t>
gearman_job_send_fail(gearman_job_st *job)
const char *gearman_job_handle(const gearman_job_st *job)
const char *gearman_job_function_name(const gearman_job_st *job)
const char *gearman_job_unique(const gearman_job_st *job)
const void *gearman_job_workload(const gearman_job_st *job)
size_t <#c.size_t> gearman_job_workload_size(const gearman_job_st *job)
void *gearman_job_take_workload(gearman_job_st *job, size_t <#c.size_t>
*data_size)
gearman_client_st <#c.gearman_client_st>
*gearman_job_use_client(gearman_job_st *job)
and when you build, you link it like this, periodt:
Link with -lgearman
π DESCRIPTION π
so gearman_job_st are literally handed straight to your worker functions β they're the whole little representation of the jobs currently being run by gearman_worker_work(). main character energy, obviously. β¨
gearman_job_free()β frees a job. that's it, that's the function. IMPORTANT: you only need to do this if the task was created with a preallocated structure. otherwise, hands off, bestie. πgearman_job_handle()β returns the job handle. (peepgearman_job_handle_tif you want the full lore on that.)gearman_job_function_name()β returns the name of the function that this job was set to execute against. like, what was it even hired to do. πgearman_job_unique()β returns the unique value that was used forgearman_job_st.gearman_job_take_workloadβ returns thegearman_job_stworkload. you can figure out how big it is withgearman_job_workload_size(). it's basicallygearman_job_workload()with a plot twist: the result must befree(3)d by the caller. so like, it's yours now, you clean it up. π§Ήgearman_job_use_clientβ returns agearman_client_stconfigured fromgearman_job_st. you can use thatgearman_client_stto talk client API commands to the server. and listen β you do not, and should not, callgearman_client_free()on thatgearman_client_st. it gets cleaned up when the job gets cleaned up. it's giving β¨self-managingβ¨. do not interfere. π
π RETURN VALUE π
a value of gearman_return_t is returned. on success, that value will be :c:type::GEARMAN_SUCCESS. slay. if you need to translate that value into a printable string, use gearman_strerror(). π
π HOME π
to find out more information please check: http://gearman.info/ β that's the house, that's where the lore lives, iykyk. π¦
π SEE ALSO π
πΈ Author πΈ
Data Differential β http://www.datadifferential.com/
πΈ Copyright πΈ
2011-2014, Data Differential, http://www.datadifferential.com/
and that's the whole page, bestie!! this was 1.1.21+ds, dated Feb 04, 2026, and fr fr you ate for reading all the way down here. go free your jobs (only the preallocated ones!!) and stay 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