- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 154 for cancelFn (0.21 sec)
-
internal/grid/muxclient.go
} } func (m *muxClient) close() { if debugPrint { fmt.Println("closing outgoing mux", m.MuxID) } if !m.respMu.TryLock() { // Cancel before locking - will unblock any pending sends. if m.cancelFn != nil { m.cancelFn(context.Canceled) } // Wait for senders to release. m.respMu.Lock() } defer m.respMu.Unlock() m.closeLocked() }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.9K bytes - Viewed (0) -
internal/grid/connection.go
go c.readStream(ctx, conn, cancel) c.writeStream(ctx, conn, cancel) } // readStream handles the read side of the connection. // It will read messages and send them to c.handleMsg. // If an error occurs the cancel function will be called and conn be closed. // The function will block until the connection is closed or an error occurs. func (c *Connection) readStream(ctx context.Context, conn net.Conn, cancel context.CancelCauseFunc) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 46.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt
*/ override fun cancel() { if (canceled) return // Already canceled. canceled = true exchange?.cancel() for (plan in plansToCancel) { plan.cancel() } eventListener.canceled(this) } override fun isCanceled(): Boolean = canceled override fun execute(): Response {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 17.9K bytes - Viewed (0) -
internal/dsync/dsync_test.go
ctx, cancel := context.WithCancel(context.Background()) if !dm.GetLock(ctx, cancel, id, source, Options{Timeout: 5 * time.Minute}) { t.Fatal("GetLock() should be successful") } // Make it run twice. timer := time.NewTimer(testDrwMutexRefreshInterval * 2) select { case <-ctx.Done(): t.Fatal("Lock context canceled which is not expected") case <-timer.C: }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 19 14:35:19 UTC 2024 - 11.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt
else -> Socket(route.proxy) } this.rawSocket = rawSocket // Handle the race where cancel() precedes connectSocket(). We don't want to miss a cancel. if (canceled) { throw IOException("canceled") } rawSocket.soTimeout = socketReadTimeoutMillis try {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 18.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt
taskFaker.advanceUntil(500.ms) assertEvents( "take plan 2", "plan 0 cancel", "plan 1 cancel", ) taskFaker.advanceUntil(510.ms) assertEvents( "plan 1 TCP connect canceled", ) taskFaker.advanceUntil(520.ms) assertEvents( "plan 0 TCP connect canceled", ) } @Test fun takeMultipleConnections() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 24 04:40:49 UTC 2024 - 20.9K bytes - Viewed (0) -
cmd/metacache-server-pool.go
c = &resp } else { rctx, cancel := context.WithTimeout(ctx, 5*time.Second) c, err = rpc.GetMetacacheListing(rctx, *o) cancel() } if err != nil { if errors.Is(err, context.Canceled) { // Context is canceled, return at once. // request canceled, no entries to return return entries, io.EOF }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 16:23:16 UTC 2024 - 12.7K bytes - Viewed (0) -
internal/grid/grid_test.go
time.Sleep(10 * time.Millisecond) default: sendReq = false } } cancel() <-serverCanceled t.Log("server cancel time:", time.Since(start)) clientEnd := <-clientCanceled if !errors.Is(err, context.Canceled) { t.Error("expected context.Canceled, got", err) } t.Log("client after", time.Since(clientEnd)) } // local to remote, unbuffered
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 36.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt
listener.clearAllEvents() assertThat(events).startsWith("CallStart", "ConnectStart", "ConnectEnd", "ConnectionAcquired") if (cancelMode == CANCEL) { assertThat(events).contains("Canceled") } else { assertThat(events).doesNotContain("Canceled") } assertThat(events).contains("ResponseFailed") assertThat(events).contains("ConnectionReleased")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 9.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 01:59:58 UTC 2024 - 18.5K bytes - Viewed (0)