gearman_client_do

Langue: en

Version: 379312 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

gearman_client_do - Single Task Interface

SYNOPSIS

#include <libgearman/gearman.h>

void *gearman_client_do(gearman_client_st *client, const char *function_name, const char *unique, const void *workload, size_t workload_size, size_t *result_size, gearman_return_t *ret_ptr);

DESCRIPTION

Run a single task and return an allocated result. *

PARAMETERS

[in]clientStructurepreviouslyinitializedwith
gearman_client_create() or gearman_client_clone().
[in]function_nameThenameofthefunctiontorun.
[in]uniqueOptionaluniquejobidentifier,orNULLforanewUUID.
[in]workloadTheworkloadtopasstothefunctionwhenitisrun.
[in]workload_sizeSizeoftheworkload.
[out]result_sizeThesizeofthedatabeingreturned.
[out]ret_ptrStandardgearmanreturnvalue.Inthecaseof
GEARMAN_WORK_DATA, GEARMAN_WORK_WARNING, or GEARMAN_WORK_STATUS, the caller should take any actions to handle the event and then call this function again. This may happen multiple times until a GEARMAN_WORK_ERROR, GEARMAN_WORK_FAIL, or GEARMAN_SUCCESS (work complete) is returned. For GEARMAN_WORK_DATA or GEARMAN_WORK_WARNING, the result_size will be set to the intermediate data chunk being returned and an allocated data buffer will be returned. For GEARMAN_WORK_STATUS, the caller can use gearman_client_do_status() to get the current tasks status.

RETURN VALUE

The result allocated by the library, this needs to be freed when the caller is done using it.

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.