[zeromq-dev] Using multiple contexts

Chuck Remes cremes.devlist at mac.com
Fri Aug 12 20:34:03 CEST 2011


On Aug 12, 2011, at 1:11 PM, Christian Martinez wrote:

> Is there a downside to using multiple contexts? I have a class wrapper I’d like to keep as simple as possible. I can either modify it to allow multiple connects, sockets etc under a single context or leave it as is and have clients of the wrapper instantiate it multiple times.
>  

Two downsides as I see it.

1. Tying up resources to no good effect (extra memory footprint, another I/O thread, etc)

2. Sockets created in different contexts *cannot* communicate with each other using the 'inproc' transport. The name 'inproc' is a bit of a misnomer; it really means "intracontext."

cr


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110812/45a50ae3/attachment.htm>


More information about the zeromq-dev mailing list