- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 585 for closeFn (0.12 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) -
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) -
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) -
src/net/http/transport.go
if err == nil { panic("nil error") } pc.broken = true if pc.closed == nil { pc.closed = err pc.t.decConnsPerHost(pc.cacheKey) // Close HTTP/1 (pc.alt == nil) connection. // HTTP/2 closes its connection itself. if pc.alt == nil { if err != errCallerOwnsConn { pc.conn.Close() } close(pc.closech) } } pc.mutateHeaderFunc = nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0) -
platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/MultiProcessSafeIndexedCacheTest.groovy
1 * backingCache.close() 0 * _._ } def "closes cache when closed"() { given: cacheOpened() when: cache.finishWork() then: 1 * fileAccess.writeFile(!null) >> { Runnable action -> action.run() } 1 * backingCache.close() 0 * _._ }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Apr 16 15:49:50 UTC 2024 - 3.5K bytes - Viewed (0)