<font face="courier new,monospace">I'm having a disconnect in my (minimal) knowledge of Perl & AnyEvent style of programming.<br><br>The problem I'm having is because my app is currently a mixture of<br>traditional Perl and AnyEvent, and its causing problems.<br>
<br>What I basically have is:<br><br>sub obtainer {<br> foreach (`prog|prog|prog`) {<br> ... do stuff...<br> }<br>}<br><br>... more stuff ...<br><br>$obtainer = AnyEvent->timer(interval => $refresh_interval, cb => \&obtainer);<br>
AnyEvent->condvar->wait;<br><br>The 'more stuff' contains 'legal' AnyEvent socket code.<br><br>Whats happening is that when obtainer() starts to run,<br>its doing so much for so long that the socket code I have<br>
doesn't get a chance to run (in time) and then the networking<br>aspect of my application fails.<br><br>What I obviously need to do is to turn my obtainer() into an event driven<br>aspect too! And I think what I want is an 'IO Watcher', but...<br>
<br>I don't know how to translate my `prog|prog` concept into the<br>filehandle concept that IO watcher talks about.<br><br>Any help or suggestions would be appreciate.<br><br>Fulko<br><br></font>