[zeromq-dev] [PATCH] Add ZMQ_TIMEOUT sockopt.
Martin Sustrik
sustrik at 250bpm.com
Tue May 24 00:08:00 CEST 2011
On 05/23/2011 09:57 PM, Fabien Niñoles wrote:
>> It's busy-looping atm, right?
> Yep, not very nice.
To get the feature to the mainline, we'll need non-busy-waiting version
of it. (Note that there's no busy waiting anywhere in 0MQ.)
The actual implementation would be presumably platform specific,
however, there's a common mechanism that we can always fallback to.
Namely, we can poll (or select on win32 and openvms) on the single file
descriptor. The poll (or select) luckily has a timeout parameter we can
use to get the behaviour we want.
Martin
More information about the zeromq-dev
mailing list