On 1 Sep 2004, at 03:13, david nicol wrote:
Based on this comment I would like to extend the proposed extension to include an optional $h->fileno() method, which would return an arrayref containing file descriptor numbers for use in the main event loop, so a busy event-driven system will know when it can be sure that calling $h->ready() will not waste cycles.
{ my $htmp = $h; my $coderef = sub { $htmp->ready and push @Readies, $htmp }; $Callback[$_] = $coderef for @{$h->fileno}; }
... buildselectvectors(@Listeners,@Clients,@Callbacks); select ...
An array ref rather than one number, so handles that have multiple connections open can report them all.
Yes, this would work. Having each DBD implement their own internal select() wouldn't work as well, because two event loops are worse than one.
Matt.