On Mon, Jun 18, 2001 at 04:43:09PM -0700, Rob Bloodgood wrote:
> Code? :-)
>
> Seriously, tho, I'm shure I could write it... I was just looking for
> suggestions as to where to start. A fifo myself, eh?
in your event handler for incoming requests, do something like:
if ($heap->{still_retrieving}) {
push(@{$heap->{requestfifo}, [$postback_to_sender, @requestdata]);
}
in the retrieving routine when everything has arrived:
foreach(@{$heap->{requestfifo}}) {
either post($_ ...);
or process($_);
}
that depends on wether it would be bad if a lot of requests block the rest
of your program. requests wouldn't get out of order since the still_retrieving
state change is atomic.
torvald