On 10/1/07, Rick R <[EMAIL PROTECTED]> wrote:
> In the data_reader callback, I push the socket info into a work queue that
> is handled by a thread pool. This is where things get wierd, I can read read
> from the socket from the other thread just fine, but libevent often fires an
> additional 30-110 events, it's like it keeps firing the event until I read
> the data, is this the correct behavior?

This is the correct behavior.  If you don't want to keep receiving
read events on that file descriptor, you'll have to call event_del()
or not use the EV_PERSIST flag.  Then you'll have to figure out a way
for the worker thread to tell the main thread to re-add the event.
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to