gearman_client_run_tasks.rst 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. =============
  2. Running tasks
  3. =============
  4. --------
  5. SYNOPSIS
  6. --------
  7. #include <libgearman/gearman.h>
  8. .. c:function:: gearman_return_t gearman_client_run_tasks(gearman_client_st *client)
  9. Link with -lgearman
  10. -----------
  11. DESCRIPTION
  12. -----------
  13. :c:func:`gearman_client_run_tasks` executes one or more tasks that have
  14. been added via :c:func:`gearman_client_add_task`,
  15. :c:func:`gearman_client_add_task_status` or
  16. :c:func:`gearman_client_add_task_background`.
  17. :c:func:`gearman_client_run_tasks` can also be used with
  18. :c:func:`gearman_execute` if either non-blocking or background tasks were
  19. created with it.
  20. ------------
  21. RETURN VALUE
  22. ------------
  23. :c:type:`gearman_return_t`
  24. If :c:type:`GEARMAN_PAUSE` is returned one of the tasks has "paused" in
  25. order to give the caller an opportunity to take some actions (like read
  26. data, handle an exception, etc...). See :c:type:`gearman_task_st` for more
  27. information about the state of a task.
  28. ----
  29. HOME
  30. ----
  31. To find out more information please check:
  32. `https://gearman.org/gearmand/ <https://gearman.org/gearmand/>`_
  33. .. seealso::
  34. :manpage:`gearmand(8)` :manpage:`libgearman(3)`