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.
--CM
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 li
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
On Fri, Aug 12, 2011 at 8: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
> client
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:
>
> Pe
My tests do this in the same file:
{ # test case 1
my $ctxt = ZeroMQ::Context->new(); # internally calls zmq_init();
... test code here
} # contxt freed
{ # test case 2
my $ctxt = ZeroMQ::Context->new(); # internally calls zmq_init();
... test code here .
Hi Daisuke,
You can create and destroy contexts in a test case like that, as long
as you're aware that these are separate 0MQ instances that can't
communicate over inproc:.
Forking is something we didn't cover yet in the Guide. You cannot
create a context and pass it to a child process. The pro
On 09/14/2010 10:40 AM, Pieter Hintjens wrote:
> Hi Daisuke,
>
> You can create and destroy contexts in a test case like that, as long
> as you're aware that these are separate 0MQ instances that can't
> communicate over inproc:.
Correct.
> Forking is something we didn't cover yet in the Guide.
p...@imatix.com said:
> Hi Daisuke,
>
> You can create and destroy contexts in a test case like that, as long
> as you're aware that these are separate 0MQ instances that can't
> communicate over inproc:.
Yes, using multiple contexts is useful for test programs where you want to
excersize the API
On Tue, Sep 21, 2010 at 8:39 AM, Martin Lucina wrote:
> Um, fork() is orthogonal to any 0MQ contexts. fork() creates a completely
> new process, so if that process created any contexts before the fork()
> those are now also present in the child.
Yes, of course... I'm not sure why I thought cont
10 matches
Mail list logo