---
name: "gearman_worker_set_options"
section: "3"
platform: "linux"
package: "gearmand"
version: "2.2.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/gearman_worker_set_options"
---

# gearman\_worker\_set\_options(3)

Gearmand Documentation, https://gearman.org/gearmand/

## NAME

gearman\_worker\_set\_options - Gearmand Documentation, https://gearman.org/gearmand/

## SYNOPSIS

\#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.

## DESCRIPTION

*gearman\_worker\_options()* returns the *gearman\_worker\_options\_t* for *gearman\_worker\_st*. You enable options via *gearman\_worker\_add\_options()* and disable options via *gearman\_worker\_remove\_options()*.

The currently supported options are:

Enable non-block IO for the worker.

- **type GEARMAN\_WORKER\_STOP\_WAIT\_ON\_SIGNAL**

  Return *GEARMAN\_IO\_WAIT* from **gearman\_wait()** when a signal interrupts the wait.

- **type GEARMAN\_WORKER\_GRAB\_UNIQ**

  Only grab jobs that have been assigned unique values. This is useful for workers who only want to worker with background jobs.

- **type GEARMAN\_WORKER\_TIMEOUT\_RETURN**

  Has a return timeout been set for the worker.

## RETURN VALUE

Various

## HOME

To find out more information please check: *https://gearman.org/gearmand/*

**SEE ALSO:**

**[gearmand(8)](/gearmand/8.md)** **[libgearman(3)](/libgearman/3.md)**

## AUTHOR

Data Differential http://www.datadifferential.com/

## COPYRIGHT

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