[zeromq-dev] External Event Loop

Praveen Baratam praveen.baratam+zmq at gmail.com
Wed Dec 22 12:27:57 CET 2010


Hello Martin,

Thanks for the feed back.

Attached to this email is a minimal testcase with out any dependencies that
reproduces the problem. Most of the code follows the implementation of*
zmq_poll* in 2.1 branch.

Even the poll call inside zmq_poll is not returning any events on the fds
when observed in a debugger.

In the test case, if the poll call is supplied a timeout, then we iterate
over all the sockets for events using zmq_getsockopt and ZMQ_EVENTS after
the poll call times out and process those events. If its supplied an
infinite timeout (-1) then the main loop halts there and the poll call never
returns.

It accurately reproduces the problem with ZMQ_FD.

Please look into it.

Thank you,

Dr. Praveen Baratam



On Sat, Dec 18, 2010 at 2:28 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:

> Hi Praveem,
>
>
>  I even tried with Edge-Triggered semantics.
>>
>> Still nothing happens. I have written test code to reproduce the problem.
>>
>> Kindly take a look.
>>
>> The FileService class in the test code is used to watch descriptors
>> using libevent. Its tested to be working fine separately. I am also
>> attaching FileService test code to this mail.
>>
>> If it works out, I shall contribute a general purpose proactor pattern
>> implementation like boost::asio for zmq sockets.
>>
>
> Can you strip down the example to minimal test case that reproduces the
> problem, with no dependencies on external projects? That way there's a
> chance someone will actually have a look at the problem and fix it.
>
> Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101222/c9e7044d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestCase.cpp
Type: text/x-c++src
Size: 4097 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101222/c9e7044d/attachment.cpp>


More information about the zeromq-dev mailing list