zmq_init.txt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. zmq_init(3)
  2. ===========
  3. NAME
  4. ----
  5. zmq_init - initialise 0MQ context
  6. SYNOPSIS
  7. --------
  8. *void *zmq_init (int 'io_threads');*
  9. DESCRIPTION
  10. -----------
  11. The _zmq_init()_ function initialises a 0MQ 'context'.
  12. The 'io_threads' argument specifies the size of the 0MQ thread pool to handle
  13. I/O operations. If your application is using only the 'inproc' transport for
  14. messaging you may set this to zero, otherwise set it to at least one.
  15. .Thread safety
  16. A 0MQ 'context' is thread safe and may be shared among as many application
  17. threads as necessary, without any additional locking required on the part of
  18. the caller.
  19. This function is deprecated by linkzmq:zmq_ctx_new[3].
  20. RETURN VALUE
  21. ------------
  22. The _zmq_init()_ function shall return an opaque handle to the initialised
  23. 'context' if successful. Otherwise it shall return NULL and set 'errno' to one
  24. of the values defined below.
  25. ERRORS
  26. ------
  27. *EINVAL*::
  28. An invalid number of 'io_threads' was requested.
  29. SEE ALSO
  30. --------
  31. linkzmq:zmq[7]
  32. linkzmq:zmq_ctx_term[3]
  33. AUTHORS
  34. -------
  35. This page was written by the 0MQ community. To make a change please
  36. read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.