Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,255 for close1 (0.13 sec)

  1. internal/http/close.go

    )
    
    // DrainBody close non nil response with any response Body.
    // convenient wrapper to drain any remaining data on response body.
    //
    // Subsequently this allows golang http RoundTripper
    // to reuse the same connection for future requests.
    func DrainBody(respBody io.ReadCloser) {
    	// Callers should close resp.Body when done reading from it.
    	// If resp.Body is not closed, the Client's underlying RoundTripper
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. 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)
  3. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/DefaultCacheFactoryTest.groovy

            0 * opened._
    
            when:
            factory.close()
    
            then:
            1 * closed.accept(implementation)
            0 * _
        }
    
        void "closes cache instance when reference is closed"() {
            def implementation
    
            when:
            def cache1 = factory.open(tmpDir.testDirectory, null, [prop: 'value'], mode(Exclusive), null, null)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:51 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  4. src/io/pipe.go

    // arrives or the write end is closed.
    // If the write end is closed with an error, that error is
    // returned as err; otherwise err is EOF.
    func (r *PipeReader) Read(data []byte) (n int, err error) {
    	return r.pipe.read(data)
    }
    
    // Close closes the reader; subsequent writes to the
    // write half of the pipe will return the error [ErrClosedPipe].
    func (r *PipeReader) Close() error {
    	return r.CloseWithError(nil)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:34:35 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  5. platforms/core-execution/build-cache/src/test/groovy/org/gradle/caching/internal/controller/service/LoadTargetTest.groovy

            then:
            input.closed
        }
    
        def "closes input on subsequent use"() {
            given:
            def input = new TestInputStream()
    
            when:
            target.readFrom(new ByteArrayInputStream([] as byte[]))
            target.readFrom(input)
    
            then:
            thrown IllegalStateException
            input.closed
        }
    
        def "closes input on error"() {
            given:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:43:12 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  6. platforms/core-execution/build-cache/src/test/groovy/org/gradle/caching/internal/controller/service/StoreTargetTest.groovy

            boolean closed
            boolean error
    
            @Override
            void write(int b) throws IOException {
                if (error) {
                    throw new IOException("bang!")
                }
            }
    
            @Override
            void close() throws IOException {
                closed = true
            }
        }
    
        def "closes output"() {
            given:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:43:12 UTC 2023
    - 2K bytes
    - Viewed (0)
  7. src/crypto/cipher/io.go

    	if n != len(src) && err == nil { // should never happen
    		err = io.ErrShortWrite
    	}
    	return
    }
    
    // Close closes the underlying Writer and returns its Close return value, if the Writer
    // is also an io.Closer. Otherwise it returns nil.
    func (w StreamWriter) Close() error {
    	if c, ok := w.W.(io.Closer); ok {
    		return c.Close()
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  8. platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/core/DefaultModelViewState.java

        }
    
        public void close() {
            closed = true;
        }
    
        public Action<Object> closer() {
            return new Action<Object>() {
                @Override
                public void execute(Object o) {
                    close();
                }
            };
        }
    
        @Override
        public void assertCanMutate() {
            if (closed) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  9. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/IoActions.java

            return result;
        }
    
        /**
         * Closes the given resource rethrowing any {@link IOException} as a {@link UncheckedIOException}.
         *
         * @param resource The resource to be closed
         */
        public static void uncheckedClose(@Nullable Closeable resource) {
            try {
                if (resource != null) {
                    resource.close();
                }
            } catch (IOException e) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  10. platforms/core-runtime/io/src/main/java/org/gradle/internal/io/LineBufferingOutputStream.java

        }
    
        /**
         * Closes this output stream and releases any system resources associated with this stream. The general contract of
         * <code>close</code> is that it closes the output stream. A closed stream cannot perform output operations and
         * cannot be reopened.
         */
        @Override
        public void close() throws IOException {
            hasBeenClosed = true;
            flush();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 12 08:51:14 UTC 2024
    - 3.8K bytes
    - Viewed (0)
Back to top