[zeromq-dev] Blocking receive with timeout

Andrew Hume andrew at research.att.com
Wed Jul 6 21:01:19 CEST 2011


thats true.
but philosophically, its the same reason as teh UNIX read system call doesn't have a timeout.
if you want to read, read.
if you need a timeout, thats what alarm() is for, or as mikko says, do polling.

On Jul 6, 2011, at 11:58 AM, Mikko Koppanen wrote:

> On Wed, Jul 6, 2011 at 9:48 PM, Christian Martinez <chmar at microsoft.com> wrote:
>> Quick question, am I missing a timeout option for a blocking receive perhaps
>> in one of the flags? If it’s not there, is there a philosophical or
>> technical reason for it not to exist?
> 
> Hi,
> 
> you can use zmq_poll with a timeout to see when the socket becomes readable.
> 
> 
> Thanks,
> Mikko
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> 


------------------
Andrew Hume  (best -> Telework) +1 623-551-2845
andrew at research.att.com  (Work) +1 973-236-2014
AT&T Labs - Research; member of USENIX and LOPSA




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110706/fa3d3eef/attachment.htm>


More information about the zeromq-dev mailing list