- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 987 for closeFn (0.66 sec)
-
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) -
pkg/log/config.go
allLoggers = append(allLoggers, &grpcLogger) } closeFns := make([]func() error, 0) for _, ext := range options.extensions { for _, logger := range allLoggers { newLogger, closeFn, err := ext(*logger) if err != nil { return err } *logger = newLogger closeFns = append(closeFns, closeFn) } } pt := patchTable{
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Mar 26 20:38:10 UTC 2024 - 12.1K 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) -
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) -
src/database/sql/sql_test.go
if !waitCondition(t, func() bool { rows.closemu.RLock() defer rows.closemu.RUnlock() return rows.closed }) { t.Fatal("failed to close rows") } } // TestQueryContextWait ensures that rows and all internal statements are closed when // a query context is closed during execution. func TestQueryContextWait(t *testing.T) { db := newTestDB(t, "people") defer closeDB(t, db) prepares0 := numPrepares(t, db)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 111.6K 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) -
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) -
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) -
src/database/sql/sql.go
// and exclusively during close. // // closemu guards lasterr and closed. closemu sync.RWMutex lasterr error // non-nil only if closed is true closed bool // closemuScanHold is whether the previous call to Scan kept closemu RLock'ed // without unlocking it. It does that when the user passes a *RawBytes scan
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:53 UTC 2024 - 103.6K bytes - Viewed (0) -
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)