Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,645 for closeFn (0.35 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

        //     we find them, regardless of what the address policies need.
        //
        //  2. EVICTABLE: Connections not required by any address policy. This matches connections that
        //     don't participate in any policy, plus connections whose policies won't be violated if the
        //     connection is closed. We only close these if the idle connection limit is exceeded.
        //
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

        ) {
          check(!closed) { "closed" }
          checkOffsetAndCount(source.size, 0, byteCount)
          sink.write(source, byteCount)
        }
    
        override fun flush() {
          if (closed) return // Don't throw; this stream might have been closed on the caller's behalf.
          sink.flush()
        }
    
        override fun close() {
          if (closed) return
          closed = true
          detachTimeout(timeout)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  3. src/compress/gzip/gzip.go

    	if z.err != nil {
    		return z.err
    	}
    	if z.closed {
    		return nil
    	}
    	if !z.wroteHeader {
    		z.Write(nil)
    		if z.err != nil {
    			return z.err
    		}
    	}
    	z.err = z.compressor.Flush()
    	return z.err
    }
    
    // Close closes the [Writer] by flushing any unwritten data to the underlying
    // [io.Writer] and writing the GZIP footer.
    // It does not close the underlying [io.Writer].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. cmd/metacache-stream.go

    				continue
    			}
    		}
    	}()
    
    	return objs, nil
    }
    
    // Close and release resources.
    func (w *metacacheWriter) Close() error {
    	if w == nil || w.closer == nil {
    		return nil
    	}
    	w.streamWg.Wait()
    	err := w.closer()
    	w.closer = nil
    	return err
    }
    
    // Reset and start writing to new writer.
    // Close must have been called before this.
    func (w *metacacheWriter) Reset(out io.Writer) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 04 12:04:40 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        val relay = edit(file, upstream, metadata, 1024)
        val source1 = relay.newSource()
        val source2 = relay.newSource()
        source1!!.close()
        source1.close() // Unnecessary. Shouldn't decrement the reference count.
        assertThat(relay.isClosed).isFalse()
        source2!!.close()
        assertThat(relay.isClosed).isTrue()
        assertFile(Relay.PREFIX_DIRTY, -1L, -1, null, null)
      }
    
      @Test
      fun racingReaders() {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  6. pkg/config/crd/validator.go

    	crds := []apiextensions.CustomResourceDefinition{}
    	closers := make([]io.Closer, 0, len(files))
    	defer func() {
    		for _, closer := range closers {
    			closer.Close()
    		}
    	}()
    	for _, file := range files {
    		data, err := os.Open(file)
    		if err != nil {
    			return nil, fmt.Errorf("failed to read input yaml file: %v", err)
    		}
    		closers = append(closers, data)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 17 15:38:40 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  7. src/runtime/os_plan9.go

    	fd := open(&buf[0], _OWRITE, 0)
    	if fd < 0 {
    		return -1
    	}
    	len := findnull(&msg[0])
    	if write1(uintptr(fd), unsafe.Pointer(&msg[0]), int32(len)) != int32(len) {
    		closefd(fd)
    		return -1
    	}
    	closefd(fd)
    	return 0
    }
    
    //go:nosplit
    func exit(e int32) {
    	var status []byte
    	if e == 0 {
    		status = emptystatus
    	} else {
    		// build error string
    		var tmp [32]byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go

    	CreateStream(headers http.Header) (Stream, error)
    	// Close resets all streams and closes the connection.
    	Close() error
    	// CloseChan returns a channel that is closed when the underlying connection is closed.
    	CloseChan() <-chan bool
    	// SetIdleTimeout sets the amount of time the connection may remain idle before
    	// it is automatically closed.
    	SetIdleTimeout(timeout time.Duration)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  9. src/mime/quotedprintable/writer.go

    	if n == len(p) {
    		return n, nil
    	}
    
    	if err := w.write(p[n:]); err != nil {
    		return n, err
    	}
    
    	return len(p), nil
    }
    
    // Close closes the [Writer], flushing any unwritten data to the underlying
    // [io.Writer], but does not close the underlying io.Writer.
    func (w *Writer) Close() error {
    	if err := w.checkLastByte(); err != nil {
    		return err
    	}
    
    	return w.flush()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 16:12:35 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  10. pkg/kubelet/cm/dra/plugin/client_test.go

    func setupFakeGRPCServer(version string) (string, tearDown, error) {
    	p, err := os.MkdirTemp("", "dra_plugin")
    	if err != nil {
    		return "", nil, err
    	}
    
    	closeCh := make(chan struct{})
    	addr := filepath.Join(p, "server.sock")
    	teardown := func() {
    		close(closeCh)
    		os.RemoveAll(addr)
    	}
    
    	listener, err := net.Listen("unix", addr)
    	if err != nil {
    		teardown()
    		return "", nil, err
    	}
    
    	s := grpc.NewServer()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 19 16:27:05 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top