Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 3,927 for closec (0.11 sec)

  1. src/net/http/serve_test.go

    			}
    			t.Cleanup(func() { bresp.Body.Close() })
    
    			// Try to cause a race. Canceling the client request will cause the client
    			// transport to close req2.Body. Returning from the server handler will
    			// cause the server to close req.Body. Since they are the same underlying
    			// ReadCloser, that will result in concurrent calls to Close (and possibly a
    			// Read concurrent with a Close).
    			if mode == http2Mode {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  2. src/internal/fuzz/worker.go

    // and closes it after the worker process closes the other end.
    func (wc *workerClient) Close() error {
    	wc.mu.Lock()
    	defer wc.mu.Unlock()
    
    	// Close fuzzIn. This signals to the server that there are no more calls,
    	// and it should exit.
    	if err := wc.fuzzIn.Close(); err != nil {
    		wc.fuzzOut.Close()
    		return err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. src/net/http/fcgi/fcgi.go

    	b[0] = byte(size)
    	return 1
    }
    
    // bufWriter encapsulates bufio.Writer but also closes the underlying stream when
    // Closed.
    type bufWriter struct {
    	closer io.Closer
    	*bufio.Writer
    }
    
    func (w *bufWriter) Close() error {
    	if err := w.Writer.Flush(); err != nil {
    		w.closer.Close()
    		return err
    	}
    	return w.closer.Close()
    }
    
    func newWriter(c *conn, recType recType, reqId uint16) *bufWriter {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 11 18:51:39 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  7. internal/lock/lock.go

    	r.mutex.Lock()
    	r.refs++
    	r.mutex.Unlock()
    }
    
    // Close - this closer implements a special closer
    // closes the underlying fd only when the refs
    // reach zero.
    func (r *RLockedFile) Close() (err error) {
    	r.mutex.Lock()
    	defer r.mutex.Unlock()
    
    	if r.refs == 0 {
    		return os.ErrInvalid
    	}
    
    	r.refs--
    	if r.refs == 0 {
    		err = r.File.Close()
    	}
    
    	return err
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. internal/s3select/progress.go

    func (pr *progressReader) Close() error {
    	pr.closedMu.Lock()
    	defer pr.closedMu.Unlock()
    	if pr.closed {
    		return nil
    	}
    	pr.closed = true
    	if pr.closer != nil {
    		pr.closer.Close()
    	}
    	return pr.rc.Close()
    }
    
    func (pr *progressReader) Stats() (bytesScanned, bytesProcessed int64) {
    	if pr == nil {
    		return 0, 0
    	}
    	return pr.scannedReader.BytesRead(), pr.processedReader.BytesRead()
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Oct 18 15:44:36 UTC 2021
    - 4.2K bytes
    - Viewed (0)
Back to top