Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 185 for closeFn (0.16 sec)

  1. pkg/test/echo/server/forwarder/http.go

    			QUICConfig:      &quic.Config{},
    		}
    	}
    	closeFn := func(conn *http3.RoundTripper) func() {
    		return func() {
    			_ = conn.Close()
    		}
    	}
    	noCloseFn := func() {}
    
    	if cfg.newConnectionPerRequest {
    		// Create a new transport (i.e. connection) for each request.
    		return func() (http.RoundTripper, func(), error) {
    			conn := newConn()
    			return conn, closeFn(conn), nil
    		}, noCloseFn
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 13:56:46 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  2. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/MultiProcessSafeIndexedCacheTest.groovy

            1 * backingCache.close()
            0 * _._
        }
    
        def "closes cache when closed"() {
            given:
            cacheOpened()
    
            when:
            cache.finishWork()
    
            then:
            1 * fileAccess.writeFile(!null) >> { Runnable action -> action.run() }
            1 * backingCache.close()
            0 * _._
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 3.5K 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. 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)
  5. src/net/http/transport_internal_test.go

    		t.Errorf("roundTrip = %#v, %v; want errServerClosedIdle, transportReadFromServerError, or nothingWrittenError", err, err)
    	}
    
    	<-pc.closech
    	err = pc.closed
    	if !isNothingWrittenError(err) && !isTransportReadFromServerError(err) && err != errServerClosedIdle {
    		t.Errorf("pc.closed = %#v, %v; want errServerClosedIdle or transportReadFromServerError, or nothingWrittenError", err, err)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:57:17 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  6. cmd/bitrot-streaming.go

    }
    
    func (b *streamingBitrotReader) Close() error {
    	if b.rc == nil {
    		return nil
    	}
    	if closer, ok := b.rc.(io.Closer); ok {
    		// drain the body for connection reuse at network layer.
    		xhttp.DrainBody(struct {
    			io.Reader
    			io.Closer
    		}{
    			Reader: b.rc,
    			Closer: closeWrapper(func() error { return nil }),
    		})
    		return closer.Close()
    	}
    	return nil
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  7. platforms/core-runtime/client-services/src/test/groovy/org/gradle/internal/daemon/client/clientinput/DaemonClientInputForwarderTest.groovy

            then:
            !receivedCommand()
        }
    
        def "stream being closed without sending anything just sends close input command"() {
            when:
            forwarder.stop()
    
            then:
            receiveClosed()
        }
    
        def cleanup() {
            source.close()
            inputStream.close()
            forwarder.stop()
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 12:11:05 UTC 2024
    - 5K bytes
    - Viewed (0)
  8. platforms/core-runtime/daemon-services/src/test/groovy/org/gradle/internal/daemon/clientinput/StdInStreamTest.groovy

        }
    
        def "read byte returns when stream is closed"() {
            def dispatch = Mock(OutputEventListener)
            def stream = new StdInStream(dispatch)
    
            when:
            async {
                start {
                    def b1 = stream.read()
                    assert b1 == -1
                }
                thread.blockUntil.requested
                stream.close()
            }
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 15 19:51:37 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  9. subprojects/core/src/test/groovy/org/gradle/internal/service/scopes/DefaultGradleUserHomeScopeServiceRegistryTest.groovy

            homeDirServices.release(services1)
    
            then:
            !homeDir2Service.closed
            !homeDir1Service.closed
    
            when:
            homeDirServices.release(services2)
    
            then:
            homeDir2Service.closed
            !homeDir1Service.closed
        }
    
        def "closes services when registry closed"() {
            def dir = new File("home-dir")
    
            given:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 27 12:34:44 UTC 2024
    - 8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/watch/watch.go

    type Interface interface {
    	// Stop tells the producer that the consumer is done watching, so the
    	// producer should stop sending events and close the result channel. The
    	// consumer should keep watching for events until the result channel is
    	// closed.
    	//
    	// Because some implementations may create channels when constructed, Stop
    	// must always be called, even if the consumer has not yet called
    	// ResultChan().
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 20:06:22 UTC 2024
    - 8.1K bytes
    - Viewed (1)
Back to top