logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

gearman_task_numerator - Gearmand Documentation, http://gearman.info/

Author

Description

       A gearman_task_st represents a task.  Work that is sent by a client to a gearman server is seen as a task
       (a worker receives a task in the form of a job.

       Tasks,  i.e.  gearman_task_st are created by calling either gearman_execute(), gearman_client_add_task(),
       or gearman_client_add_task_background().

       gearman_client_add_task_status() can also create gearman_task_st, these tasks will be used to  monitor  a
       previously created gearman_task_st.

       gearman_task_free()  is  used  to  free  a  task. This only needs to be done if a task was created with a
       preallocated structure or if you want to clean up the memory of a specific task.

       gearman_task_set_context() sets the given context of the gearman_task_st. The context can be used to pass
       information to a gearman_task_st.

       gearman_task_context() returns the context that was used in the creation of the gearman_task_st (or  that
       was set with gearman_task_set_context().

       gearman_task_data() returns the current data that has been returned to the task. gearman_task_data_size()
       will  give you the size of the value. gearman_task_take_data() is the same as gearman_task_data() but the
       value that is returned must be freed by the client (free(3)). gearman_task_recv_data() can be  used  with
       pre-allocated buffers.

       gearman_task_is_known(),         gearman_task_is_running(),         gearman_task_numerator(),         and
       gearman_task_denominator(), return values related to  the  last  status  update  that  was  made  to  the
       gearman_task_st. They do not cause the gearman_task_st to update itself.

       gearman_task_error()   return   the   last   error   message   that   the   gearman_task_st  encountered.
       gearman_task_return() return the last gearman_return_t stored. A  value  of  GEARMAN_UNKNOWN_STATE  means
       that the task has not been submitted to server yet, or that no function was available if the job has been
       submitted.

Home

       To find out more information please check: http://gearman.info/

Name

       gearman_task_numerator - Gearmand Documentation, http://gearman.info/

Return Value

       Various. Values that are returned by gearman_task_take_data() must have free(3) called on them.

See Also

gearmand(8)libgearman(3)

Synopsis

       #include <libgearman/gearman.h>

       typegearman_task_stvoidgearman_task_free(gearman_task_st*task)void*gearman_task_context(constgearman_task_st*task)voidgearman_task_set_context(gearman_task_st*task,void*context)constchar*gearman_task_function_name(constgearman_task_st*task)constchar*gearman_task_unique(constgearman_task_st*task)constchar*gearman_task_job_handle(constgearman_task_st*task)boolgearman_task_is_known(constgearman_task_st*task)boolgearman_task_is_running(constgearman_task_st*task)uint32_tgearman_task_numerator(constgearman_task_st*task)uint32_tgearman_task_denominator(constgearman_task_st*task)voidgearman_task_give_workload(gearman_task_st*task,constvoid*workload,size_tworkload_size)size_tgearman_task_send_workload(gearman_task_st*task,constvoid*workload,size_tworkload_size,gearman_return_t*ret_ptr)constvoid*gearman_task_data(constgearman_task_st*task)size_tgearman_task_data_size(constgearman_task_st*task)void*gearman_task_take_data(gearman_task_st*task,size_t*data_size)size_tgearman_task_recv_data(gearman_task_st*task,void*data,size_tdata_size,gearman_return_t*ret_ptr)constchar*gearman_task_error(constgearman_task_st*task)

       Added in version 0.21.

       gearman_return_tgearman_task_return(constgearman_task_st*task)

       Added in version 0.21.

       Link with -lgearman

See Also