- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 180 for cancelFn (0.14 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) -
internal/grid/stream.go
// Results returns the results from the remote server one by one. // If any error is returned by the callback, the stream will be canceled. // If the context is canceled, the stream will be canceled. func (s *Stream) Results(next func(b []byte) error) (err error) { done := false defer func() { if s.cancel != nil { s.cancel(err) } if !done { // Drain channel. for range s.responses { } } }()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 3.1K bytes - Viewed (0) -
cmd/namespace-lock.go
// LockContext lock context holds the lock backed context and canceler for the context. type LockContext struct { ctx context.Context cancel context.CancelFunc } // Context returns lock context func (l LockContext) Context() context.Context { return l.ctx } // Cancel function calls cancel() function func (l LockContext) Cancel() { if l.cancel != nil { l.cancel() } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Futures.java
* * <p>This differs from {@link #successfulAsList(ListenableFuture[])} in that it will return a * failed future if any of the items fails. * * <p>Canceling this future will attempt to cancel all the component futures, and if any of the * provided futures fails or is canceled, this one is, too. * * @param futures futures to combine * @return a future that provides a list of the results of the component futures
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 64.7K 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) -
guava/src/com/google/common/util/concurrent/Futures.java
* * <p>This differs from {@link #successfulAsList(ListenableFuture[])} in that it will return a * failed future if any of the items fails. * * <p>Canceling this future will attempt to cancel all the component futures, and if any of the * provided futures fails or is canceled, this one is, too. * * @param futures futures to combine * @return a future that provides a list of the results of the component futures
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 64.4K 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) -
cmd/batch-handlers.go
} return nil } // delete canceler from the map, cancel job if requested func (j *BatchJobPool) canceler(jobID string, cancel bool) error { if j == nil { return errInvalidArgument } j.jmu.Lock() defer j.jmu.Unlock() if canceler, ok := j.jobCancelers[jobID]; ok { if cancel { canceler() } } if cancel { delete(j.jobCancelers, jobID) } return nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 18 15:32:09 UTC 2024 - 62.2K bytes - Viewed (0)