Am 08.04.2014 22:42, schrieb mark:
> Most trivial ZMQ examples use a spinning loop to receive messages, like so:
>
> *while (true)*
> *{*
> * // Wait for next request from client*
> * string message = server.Receive(Encoding.Unicode);*
> * //.....*
> *}*
>
> Which obviously ties up a thread.
>
> Is there a better way (preferably in C#) to wait for incoming messages?
In which aspect do you consider this to be inefficient? This handles one
message after another, and I guess the call to Receive blocks, so the
loop is not really "spinning".
Regards,
Matthias
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev