<font face="courier new,monospace">I'm sure this is against AnyEvent's philosophy, but...<br><br>I have a timer method that gets woken up periodically to<br>see if (another applications) data has changed, and if so<br>

it initiates a sequence of events that register a callback<br>and push_write() something to a remote socket (part 1).<br>When the response arrives, that callback is execute and it<br>performs another transaction with the remote socket (part 2).<br>

<br>My issue seems to be that...<br><br>because the timer method wakes up and 'processes a file'<br>the system performs _all_ of the 'part 1' sends first, (and queues<br>up a lot of outbound traffic) and then, since the file<br>

processing is now complete, and that timer method finally returns...<br>AnyEvent is now allowed back to its event loop, and can<br>process all of the 'part 1' responses it receives (that<br>have been queueing up.<br>

<br>Sortof a:<br><br>start ... burstTX... return... burstRx processing... done<br><br>And this seems to be causing networking difficulties because<br>of either the amount of TX queuing, or RX queueing going on.<br>-----<br>

So my first thought was, how can I, in my part 1 loop, allow<br>the eventloop to detect and process transmits and receives,<br>and when idle, let me (my current processing loop) continue?<br>...some kind of anyevent::allow_eventloop_till_idle() function.<br>

It seems almost as if my main function needs to be broken<br>into something that gets run a bit at a time, inside<br>an idle watcher callback, but that's a real pain.<br>----<br>My second thought was that somehow Coro can come to my<br>

rescue, but I don't understand how I can merge the two<br>together, and what I need to do in my mainline and timer callback<br>to get it to work.<br><br><br>Any help, guidance, direction, or examples would be appreciated.<br>

<br>Fulko<br><br></font>