On 09/14/2010 07:56 AM, Martin Sustrik wrote:
> Hi Pieter,
>
> One frequent misuse of 0MQ is that newbies tend to open multiple context
> objects with no apparent reason.
>
> What about explaining the correct usage in the user guide?
>
> The _only_ use case for multiple contexts is this one:
>
> Person A writes a library using 0MQ. Person B writes another library
> using 0MQ. Person C links both libraries to his application. If each
> haven't had a separate context the two 0MQ instances would clash. Name
> clashes in the shared namespace for inproc endpoints. How many I/O
> threads to launch, A's amount or B's amount? etc.
>
> In short: If you are writing an application use _one_ context object.
> Another context object can arrive in the process only by linking with a
> different application.

Of course, "library" translates to "module" or such for non-C languages.

Martin
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to