GEARMAN_WORKER_SET_OPTIONS(3)

πŸ‘‘ GEARMAN_WORKER_SET_OPTIONS πŸ‘‘

okay bestie, so this is a page from the gearmand manual β€” section 3, the library-function corner of the world. Sit down, sip ur lil drink, we're talking about toggling options on a worker ✨


🌸 NAME 🌸

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

like. that's the whole name section. she's brief. she's iconic. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

the vibes first, the code second:

#include <libgearman/gearman.h>

type gearman_worker_options_t

gearman_worker_options_t gearman_worker_options(const gearman_worker_st *worker)

void gearman_worker_add_options(gearman_worker_st *worker, gearman_worker_options_t options)

void gearman_worker_remove_options(gearman_worker_st *worker, gearman_worker_options_t options)

void gearman_worker_set_options(gearman_worker_st *worker, gearman_worker_options_t options)
⚠️ Deprecated since version 0.21. yes bestie she's old money. still documented, still hanging around, but the era has moved on. ngl if you're writing fresh code you already know.

✨ DESCRIPTION ✨

so gearman_worker_options() hands you back the gearman_worker_options_t that belongs to a gearman_worker_st. that's the lil bag of flags, the worker's whole personality basically 🫢

and how do you change that personality?? two ways:

  • gearman_worker_add_options() β€” turns options ON (enabling).
  • gearman_worker_remove_options() β€” turns options OFF (disabling).

the currently supported options are, in order:

  • Enable non-block IO for the worker. β€” fr fr, this is the non-blocking IO switch. that's it, that's the description. (yes the original gives no macro name here, so i'm not making one up. periodt.)
    • type GEARMAN_WORKER_GRAB_UNIQ β€” only grabs jobs that have been assigned unique values. lowkey perfect for workers who only wanna work with background jobs πŸ‘‘
    • type GEARMAN_WORKER_TIMEOUT_RETURN β€” has a return timeout been set for the worker. it's giving "are we timing out or are we returning" energy πŸ’€

πŸ“¦ RETURN VALUE πŸ“¦

Various

that's it. that's the return value section. literally one word. the manual is being mysterious on purpose and honestly?? respect. πŸ™ˆ


🏠 HOME 🏠

wanna find out more?? go touch grass at:

see also (the besties in the friend group):


πŸ¦‹ Author πŸ¦‹

Data Differential β€” http://www.datadifferential.com/

2011-2014, Data Differential, http://www.datadifferential.com/


🌈 ok that's the whole page bestie!! you now know everything this manual knows, no cap. go enable some options responsibly. mwah πŸ’–

1.1.21+ds Β· Feb 04, 2026 Β· GEARMAN_WORKER_SET_OPTIONS(3) πŸŽ€βœ¨

πŸ“¦ where this page comes from