erickt / rust-zmq

Rust zeromq bindings.
Apache License 2.0
900 stars 194 forks source link

Allow creation with more than default IO threads #206

Closed bspeice closed 4 years ago

bspeice commented 6 years ago

How difficult would it be to allow creation of a ZMQ context with more than one IO thread? I don't know if Rust has any special considerations, though I would expect it is just a different call to the context initialization.

andriipatsula commented 6 years ago

http://api.zeromq.org/3-2:zmq-ctx-set Seems, only via unsafe { zmq_sys::zmq_ctx_set(...) } with option name ZMQ_IO_THREADS

rotty commented 6 years ago

As @andriipatsula noted, the zmq crate does not yet wrap the zmq_ctx_set API; this should be added, together with support for zmq_ctx_get. Patches welcome; in the absence of patches I'll implement support when I come around to it.