>
>
> How readable is that? And what about the global variables? etc.
>
>
I absolutely agree that recv() is more readable than using callbacks, but
it has the undesirable characteristic that it blocks the calling thread
until the response arrives...  Imagine an RPC server A with a few worker
threads that in order to process a request from a client it needs to make a
request to another server B. Having a worker thread on server A blocking on
recv() from a socket that is connected to server B will hurt performance.
The waiting thread could have been serving other requests while it has been
waiting inside recv().
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to