gearman_client_add_task_status.rst 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ==================================================
  2. Adding a task to monitor a previously created task
  3. ==================================================
  4. --------
  5. SYNOPSIS
  6. --------
  7. #include <libgearman/gearman.h>
  8. .. c:function:: gearman_task_st *gearman_client_add_task_status(gearman_client_st *client, gearman_task_st *task, void *context, const char *job_handle, gearman_return_t *ret_ptr)
  9. Link with -lgearman
  10. -----------
  11. DESCRIPTION
  12. -----------
  13. :c:func:`gearman_client_add_task_status` creates a :c:type:`gearman_task_st` that can be used to monitor a previously created task.
  14. .. warning::
  15. You may wish to avoid using :c:func:`gearman_client_add_task` with a
  16. stack based allocated :c:type:`gearman_task_st`. The most common issues related to ABI safety involve
  17. stack allocated structures. If you use a stack based :c:type:`gearman_task_st` you must free it with :c:func:`gearman_task_free`.
  18. ------------
  19. RETURN VALUE
  20. ------------
  21. The :c:type:`gearman_task_st` is created and a pointer to it is returned. On error NULL is returned and ret_ptr is set with a :c:type:`gearman_return_t`.
  22. ----
  23. HOME
  24. ----
  25. To find out more information please check:
  26. `https://gearman.org/gearmand/ <https://gearman.org/gearmand/>`_
  27. .. seealso::
  28. :manpage:`gearmand(8)` :manpage:`libgearman(3)` :manpage:`gearman_task_st(3)`