Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 424 for cancels (0.1 sec)

  1. src/context/x_test.go

    		checkValues("after timeout")
    	} else {
    		cancel := cancels[r.Intn(len(cancels))]
    		cancel()
    		select {
    		case <-ctx.Done():
    		default:
    			errorf("ctx should be canceled")
    		}
    		checkValues("after cancel")
    	}
    }
    
    func TestWithCancelCanceledParent(t *testing.T) {
    	parent, pcancel := WithCancelCause(Background())
    	cause := fmt.Errorf("Because!")
    	pcancel(cause)
    
    	c, _ := WithCancel(parent)
    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. cmd/consolelogger.go

    			if ok {
    				if (lg.Entry != log.Entry{}) {
    					logs = append(logs, lg.Entry)
    				}
    			}
    		}
    	})
    	sys.RUnlock()
    
    	return
    }
    
    // Cancel - cancels the target
    func (sys *HTTPConsoleLoggerSys) Cancel() {
    }
    
    // Type - returns type of the target
    func (sys *HTTPConsoleLoggerSys) Type() types.TargetType {
    	return types.TargetConsole
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. 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)
  5. internal/cachevalue/cache.go

    	t.Once.Do(func() {
    		t.ttl = ttl
    		t.updateFn = update
    		t.opts = opts
    	})
    }
    
    // GetWithCtx will return a cached value or fetch a new one.
    // passes a caller context, if caller context cancels nothing
    // is cached.
    // If the Update function returns an error the value is forwarded as is and not cached.
    func (t *Cache[T]) GetWithCtx(ctx context.Context) (T, error) {
    	v := t.val.Load()
    	ttl := t.ttl
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 12:50:46 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  6. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r65/ToolingApiShutdownCrossVersionSpec.groovy

            sync.waitForAllPendingCalls(resultHandler)
            cancellation.cancel()
            Thread.sleep(200) // The daemon seems to drop messages arriving the same time
            connector.disconnect()
            resultHandler.finished()
    
            then:
            resultHandler.assertFailedWith(BuildCancelledException)
        }
    
        def "can call cancel after disconnect"() {
            buildFile.text = """
                task hang {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 16 10:10:39 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  7. src/net/http/transport_dial_test.go

    func (dt *transportDialTester) roundTrip() *transportDialTesterRoundTrip {
    	dt.t.Helper()
    	ctx, cancel := context.WithCancel(context.Background())
    	pr, pw := io.Pipe()
    	rt := &transportDialTesterRoundTrip{
    		t:           dt.t,
    		roundTripID: dt.roundTripCount,
    		done:        make(chan struct{}),
    		reqBody:     pw,
    		cancel:      cancel,
    	}
    	dt.roundTripCount++
    	dt.t.Logf("RoundTrip %v: started", rt.roundTripID)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:11:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/api/batch/v1beta1/generated.proto

      // Valid values are:
      //
      // - "Allow" (default): allows CronJobs to run concurrently;
      // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
      // - "Replace": cancels currently running job and replaces it with a new one
      // +optional
      optional string concurrencyPolicy = 3;
    
      // This flag tells the controller to suspend subsequent executions, it does
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 28 15:34:11 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. common-protos/k8s.io/api/batch/v1beta1/generated.proto

      // Valid values are:
      //
      // - "Allow" (default): allows CronJobs to run concurrently;
      // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
      // - "Replace": cancels currently running job and replaces it with a new one
      // +optional
      optional string concurrencyPolicy = 3;
    
      // This flag tells the controller to suspend subsequent executions, it does
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 11 18:43:24 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  10. src/runtime/netpoll_windows.go

    	)
    	mp := getg().m
    	// A wait completion packet can only be associated with one timer at a time,
    	// so we need to cancel the previous one if it exists. This wouldn't be necessary
    	// if the poller would only be woken up by the timer, in which case the association
    	// would be automatically canceled, but it can also be woken up by other events,
    	// such as a netpollBreak, so we can get to this point with a timer that hasn't
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 9.4K bytes
    - Viewed (0)
Back to top