while( 1 ) {
if (
my ($readers, $writers, $exceptors) =
IO::Select::select($selector, $selector, $selector, 0.1)
) {
for( @$readers ) {
## See what they have to say
}
for( @$writers ) {
## Tell'em what they need to know
}
for( @$exceptors ) {
## Deal with their tantrums
}
}
if( $Qstdin->pending ) {
my $kbinput = $Qstdin->dequeue;
## do whatever
}
}
Another possible improvement would be to ditch Thread::Queue in favour of a Win32::Socketpair "pipe".
|