Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 427 for cancel3b (0.22 sec)

  1. src/context/x_test.go

    	}
    	if got := Cause(ctx); got != Canceled {
    		t.Errorf("after CancelCauseFunc Cause(ctx) = %v, want %v", got, Canceled)
    	}
    	if got := ccc.Err(); got != Canceled {
    		t.Errorf("after CancelCauseFunc ccc.Err() = %v, want %v", got, Canceled)
    	}
    	if got := Cause(ccc); got != Canceled {
    		t.Errorf("after CancelCauseFunc Cause(ccc) = %v, want %v", got, Canceled)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  2. src/context/context.go

    // Calling cancel with nil sets the cause to Canceled.
    //
    // Example use:
    //
    //	ctx, cancel := context.WithCancelCause(parent)
    //	cancel(myError)
    //	ctx.Err() // returns context.Canceled
    //	context.Cause(ctx) // returns myError
    func WithCancelCause(parent Context) (ctx Context, cancel CancelCauseFunc) {
    	c := withCancel(parent)
    	return c, func(cause error) { c.cancel(true, Canceled, cause) }
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 23.7K bytes
    - Viewed (0)
  3. src/database/sql/example_service_test.go

    		// This is a long SELECT. Use the request context as the base of
    		// the context timeout, but give it some time to finish. If
    		// the client cancels before the query is done the query will also
    		// be canceled.
    		ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second)
    		defer cancel()
    
    		var names []string
    		rows, err := db.QueryContext(ctx, "select p.name from people as p where p.active = true;")
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 20:21:26 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/sync/errgroup/errgroup.go

    //
    // The derived Context is canceled the first time a function passed to Go
    // returns a non-nil error or the first time Wait returns, whichever occurs
    // first.
    func WithContext(ctx context.Context) (*Group, context.Context) {
    	ctx, cancel := withCancelCause(ctx)
    	return &Group{cancel: cancel}, ctx
    }
    
    // Wait blocks until all function calls from the Go method have returned, then
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:57:25 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  5. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  6. platforms/core-runtime/daemon-protocol/src/main/java/org/gradle/launcher/daemon/protocol/Cancel.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package org.gradle.launcher.daemon.protocol;
    
    public class Cancel extends Message {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 702 bytes
    - Viewed (0)
  7. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  8. platforms/core-runtime/launcher/src/main/java/org/gradle/launcher/daemon/server/DaemonStateCoordinator.java

                                condition.await();
                                break;
                            case Canceled:
                                LOGGER.debug("cancel requested.");
                                DaemonStopState state = cancelNow();
                                if (state != null) {
                                    // Could not cancel cleanly, so stop
                                    return state;
                                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 29 06:47:38 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  9. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/util/wait/wait_test.go

    	ctx, cancel := context.WithCancel(context.Background())
    	cancel()
    	return ctx, cancel
    }
    func deadlinedContext() (context.Context, context.CancelFunc) {
    	ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond)
    	for ctx.Err() != context.DeadlineExceeded {
    		time.Sleep(501 * time.Microsecond)
    	}
    	return ctx, cancel
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 41.1K bytes
    - Viewed (0)
Back to top