mirror of
				https://github.com/pragma-/pbot.git
				synced 2025-11-04 00:27:23 +01:00 
			
		
		
		
	Significantly improve delay of background-processing
This commit is contained in:
		
							parent
							
								
									6e61160002
								
							
						
					
					
						commit
						d88b516e01
					
				@ -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(),
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user