Hi all, I'd like to canvas opinion for some cleanup of the ctx creation API. This would be a backwards compatible change in accordance with http://www.zeromq.org/docs:policies#toc2.
There are several faults with the current context API: * It is inconsistent with the rest of the API, e.g. zmq_init for a new context vs. zmq_msg_init vs. zmq_socket for a new socket. * It still has that iothreads option in zmq_init, which IMO should have gone a long time ago. * It is not extensible, so we are seeing new experiments like zmq_init_thread_safe(). My proposal is to make a new consistent API for contexts: * zmq_ctx_init and zmq_ctx_term * zmq_ctx_peek and zmq_ctx_poke to get/set options * explicit option settings for ZMQ_IOTHREADS and ZMQ_THREADSAFE And internally this would create the context lazily, only when the first socket is created (so the IOTHREADS can be applied then). There is a separate discussion about changing the functions for get/set message options. Peek/poke are short. getctxopt/setctxopt are messy wrt the other ctx functions. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
