Hi been working with your library for abit now, just under the Lib::Event perl module.... I ran into something and was wondering if it has to do with perl module or c library its linked against....


event_new($childtoparent,EV_WRITE,\&myfunction)->add();
event_new($childtoparent,EV_WRITE,\&myfunction)->add();
event_mainloop();


Now what happens is it will just hang it seems because I added 2 or more write events on same filehandle. It only works if I only use 1. Well maybe I'd like to do something like print "blah blah blah"; to the socket/pipe then on second round do print "blah blah blah\r\n";

This is a pipe created with socketpair.

I tested it the other way around using EV_READ and I could put say:

event_new($parenttochild,EV_READ,\&myfunction)->add();
event_new($parenttochild,EV_READ,\&myfunction)->add();
event_new($parenttochild,EV_READ,\&myfunction)->add();
event_mainloop();

there as many times as i wanted with no hangups.
The hangup is in the write select itself on the pipe as it never gets to the function unless I specify a timeout for it....not sure if this is a bug or not. I've tried on linux , freebsd with select,kqueue etc with all the same results.

As my first post to list, wanted to say thankyou for your time and patience.


Dan.

_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to