Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ErrNotPollable (0.16 sec)

  1. src/internal/poll/fd.go

    func (e *DeadlineExceededError) Timeout() bool   { return true }
    func (e *DeadlineExceededError) Temporary() bool { return true }
    
    // ErrNotPollable is returned when the file or socket is not suitable
    // for event notification.
    var ErrNotPollable = errors.New("not pollable")
    
    // consume removes data from a slice of byte slices, for writev.
    func consume(v *[][]byte, n int64) {
    	for len(*v) > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:16:28 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  2. src/internal/poll/error_test.go

    // license that can be found in the LICENSE file.
    
    package poll_test
    
    import (
    	"fmt"
    	"io/fs"
    	"net"
    	"os"
    	"testing"
    	"time"
    )
    
    func TestReadError(t *testing.T) {
    	t.Run("ErrNotPollable", func(t *testing.T) {
    		f, err := badStateFile()
    		if err != nil {
    			t.Skip(err)
    		}
    		defer f.Close()
    
    		// Give scheduler a chance to have two separated
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 02:32:42 UTC 2020
    - 1K bytes
    - Viewed (0)
  3. src/internal/poll/error_linux_test.go

    	// configured in halfway.
    	return os.OpenFile("/dev/net/tun", os.O_RDWR, 0)
    }
    
    func isBadStateFileError(err error) (string, bool) {
    	switch err {
    	case poll.ErrNotPollable, syscall.EBADFD:
    		return "", true
    	default:
    		return "not pollable or file in bad state error", false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 08:53:02 UTC 2019
    - 748 bytes
    - Viewed (0)
  4. src/internal/poll/fd_poll_runtime.go

    	switch res {
    	case pollNoError:
    		return nil
    	case pollErrClosing:
    		return errClosing(isFile)
    	case pollErrTimeout:
    		return ErrDeadlineExceeded
    	case pollErrNotPollable:
    		return ErrNotPollable
    	}
    	println("unreachable: ", res)
    	panic("unreachable")
    }
    
    // SetDeadline sets the read and write deadlines associated with fd.
    func (fd *FD) SetDeadline(t time.Time) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:59 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. src/net/error_test.go

    		return nil
    	}
    	switch err := nestedErr.(type) {
    	case *os.SyscallError:
    		nestedErr = err.Err
    		goto third
    	}
    	switch nestedErr {
    	case ErrClosed, errTimeout, poll.ErrNotPollable, os.ErrDeadlineExceeded:
    		return nil
    	}
    	return fmt.Errorf("unexpected type on 2nd nested level: %T", nestedErr)
    
    third:
    	if isPlatformError(nestedErr) {
    		return nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 20.3K bytes
    - Viewed (0)
Back to top