3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-01 17:16:39 +02:00

Significantly improve delay of background-processing

This commit is contained in:
Pragmatic Software 2020-07-15 11:07:35 -07:00
parent 6e61160002
commit d88b516e01
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,7 @@ sub new {
'_schedulequeue' => new PBot::IRC::EventQueue(), # pragma_ 2011/01/21
'_outputqueue' => new PBot::IRC::EventQueue(), # pragma_ 2011/01/21
'_read' => IO::Select->new(),
'_timeout' => 1,
'_timeout' => 0,
'_write' => IO::Select->new(),
};

View File

@ -34,7 +34,8 @@ sub remove_reader {
sub do_select {
my ($self) = @_;
my $length = 8192;
my @ready = $self->{select}->can_read(0);
my @ready = $self->{select}->can_read(.1);
foreach my $fh (@ready) {
my $ret = sysread($fh, my $buf, $length);