[zeromq-dev] Some question about blocking send/recv
srp at ideadevice.com
Fri Nov 4 10:11:45 CET 2011
On Fri, Nov 4, 2011 at 2:39 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Hi Saju,
> I am not able to replicate this behaviour. If I start the server your
>> server with a sleep(60) instead of the sleep(1), and then fire multiple
>> clients against this server, all clients get queued up with a ~60sec
>> delay between each client. The /*do work*/ payload of your main loop is
>> sequential. As I understand IO is handled by independent IO threads but
>> that doesn't automatically "parallelize" your application itself.
> If processing one task takes 60 secs, single thread obviously can't do
> more than 1 message a minute.
> To create a multithreaded server have a look here:
Yes. This is the behavior I expect. I was surprised that OP was seeing
clients working in parallel - or perhaps I misunderstood his email.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev