Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,801 for close1 (0.53 sec)

  1. src/internal/types/testdata/check/builtins0.go

    	clear(m)
    	clear(s)
    	clear([]int{})
    }
    
    func close1() {
    	var c chan int
    	var r <-chan int
    	close() // ERROR "not enough arguments"
    	close(1, 2) // ERROR "too many arguments"
    	close(42 /* ERROR "cannot close non-channel" */)
    	close(r /* ERROR "receive-only channel" */)
    	close(c)
    	_ = close /* ERROR "used as value" */ (c)
    
    	var s []chan int
    	close(s... /* ERROR "invalid use of ..." */ )
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/Closer.java

     *
     * <pre>{@code
     * Closer closer = Closer.create();
     * try {
     *   InputStream in = closer.register(openInputStream());
     *   OutputStream out = closer.register(openOutputStream());
     *   // do stuff
     * } catch (Throwable e) {
     *   // ensure that any checked exception types other than IOException that could be thrown are
     *   // provided here, e.g. throw closer.rethrow(e, CheckedException.class);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/io/Closer.java

     *
     * <pre>{@code
     * Closer closer = Closer.create();
     * try {
     *   InputStream in = closer.register(openInputStream());
     *   OutputStream out = closer.register(openOutputStream());
     *   // do stuff
     * } catch (Throwable e) {
     *   // ensure that any checked exception types other than IOException that could be thrown are
     *   // provided here, e.g. throw closer.rethrow(e, CheckedException.class);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  4. 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)
  5. internal/ioutil/ioutil.go

    		w.wLimit -= int64(n1)
    		return n, err
    	}
    	n1, err = w.Writer.Write(p)
    	w.wLimit -= int64(n1)
    	return n, err
    }
    
    // Close closes the LimitWriter. It behaves like io.Closer.
    func (w *LimitWriter) Close() error {
    	if closer, ok := w.Writer.(io.Closer); ok {
    		return closer.Close()
    	}
    	return nil
    }
    
    // LimitedWriter takes an io.Writer and returns an ioutil.LimitWriter.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/CloserTest.java

        Closer closer = new Closer(suppressor);
    
        TestCloseable c1 = closer.register(TestCloseable.normal());
        TestCloseable c2 = closer.register(TestCloseable.normal());
    
        IOException exception = new IOException();
    
        try {
          try {
            throw exception;
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. src/net/http/httptest/server.go

    	// wg counts the number of outstanding HTTP requests on this server.
    	// Close blocks until all requests are finished.
    	wg sync.WaitGroup
    
    	mu     sync.Mutex // guards closed and conns
    	closed bool
    	conns  map[net.Conn]http.ConnState // except terminal states
    
    	// client is configured for use with the server.
    	// Its transport is automatically closed when Close is called.
    	client *http.Client
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:26:10 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

     *
     * <pre>{@code
     * FluentFuture<UserName> userName =
     *     ClosingFuture.submit(
     *             closer -> closer.eventuallyClose(database.newTransaction(), closingExecutor),
     *             executor)
     *         .transformAsync((closer, transaction) -> transaction.queryClosingFuture("..."), executor)
     *         .transform((closer, result) -> result.get("userName"), directExecutor())
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 12:37:15 UTC 2024
    - 98.3K bytes
    - Viewed (0)
Back to top