gearman_worker_add_function

Langue: en

Version: 356527 (ubuntu - 24/10/10)

Section: 3 (Bibliothèques de fonctions)

NAME

gearman_worker_add_function - Worker Declarations

SYNOPSIS

#include <libgearman/gearman.h>

gearman_return_t gearman_worker_add_function(gearman_worker_st *worker, const char *function_name, uint32_t timeout, gearman_worker_fn *function, void *context);

DESCRIPTION

Register and add callback function for worker. To remove functions that have been added, call gearman_worker_unregister() or gearman_worker_unregister_all(). *

PARAMETERS

[in] worker Structure previously initialized with gearman_worker_create() or gearman_worker_clone().
[in] function_name Function name to register.
[in] timeout Optional timeout (in seconds) that specifies the maximum time a job should. This is enforced on the job server. A value of 0 means an infinite time.
[in] function Function to run when there is a job ready.
[in] context Argument to pass into the callback function.

RETURN VALUE

Standard gearman return value.

SEE ALSO

The Gearman homepage: http://www.gearman.org/

BUGS

Bugs should be reported at https://bugs.launchpad.net/gearmand

COPYING

Copyright (C) 2008 Brian Aker, Eric Day. All rights reserved.

Use and distribution licensed under the BSD license. See the COPYING file in the original source for full text.