- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 3,886 for close2 (0.18 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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)