Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 994 for cancels (0.15 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/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)
  3. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/work/ConditionalExecution.java

         */
        void complete();
    
        /**
         * Whether this execution has been completed or not.
         */
        boolean isComplete();
    
        /**
         * Cancels this execution.
         */
        void cancel();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  4. subprojects/core/src/main/java/org/gradle/internal/work/AsyncWorkCompletion.java

         */
        void waitForCompletion();
    
        /**
         * Returns true if the work item is completed.
         */
        boolean isComplete();
    
        /**
         * Cancels this work item.
         */
        void cancel();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 14 16:55:12 UTC 2018
    - 1017 bytes
    - Viewed (0)
  5. cni/cmd/install-cni/main.go

    )
    
    func main() {
    	// Create context that cancels on termination signal
    	ctx, cancel := context.WithCancel(context.Background())
    	sigChan := make(chan os.Signal, 1)
    	signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
    	go func(sigChan chan os.Signal, cancel context.CancelFunc) {
    		sig := <-sigChan
    		log.Infof("Exit signal received: %s", sig)
    		cancel()
    	}(sigChan, cancel)
    
    	rootCmd := cmd.GetCommand()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  6. platforms/core-execution/execution/src/test/groovy/org/gradle/internal/execution/steps/CancelExecutionStepTest.groovy

            then:
            result == delegateResult
    
            1 * delegate.execute(work, context) >> delegateResult
    
            then:
            0 *_
        }
    
        def "cancels execution when cancellation is requested"() {
            given:
            cancellationToken.cancel()
    
            when:
            step.execute(work, context)
    
            then:
            thrown BuildCancelledException
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:46:15 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  7. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/operations/BuildOperationQueue.java

         */
        void add(T operation);
    
        /**
         * Cancels all queued operations in this queue.  Any operations that have started will be allowed to complete.
         */
        void cancel();
    
        /**
         * Waits for all previously added operations to complete.
         * <p>
         * On failure, some effort is made to cancel any operations that have not started.
         *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  8. subprojects/core/src/testFixtures/groovy/org/gradle/internal/classpath/intercept/TestInterceptorsSubstitution.groovy

                setCurrentInterceptorSet(interceptorFactorySet as T)
            }
            return interceptorFactorySet as ThreadLocalInterceptorSet<T>
        }
    
        /**
         * Cancels the call interceptors substitution for the current thread.
         * If the global implementation does not have any other active call interceptors in the other threads, reverts the
         * global call interceptors implementation.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 16:29:37 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  9. 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)
  10. okhttp/src/main/kotlin/okhttp3/Call.kt

       * exception.
       *
       * @throws IllegalStateException when the call has already been executed.
       */
      fun enqueue(responseCallback: Callback)
    
      /** Cancels the request, if possible. Requests that are already complete cannot be canceled. */
      fun cancel()
    
      /**
       * Returns true if this call has been either [executed][execute] or [enqueued][enqueue]. It is an
       * error to execute a call more than once.
       */
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 3.6K bytes
    - Viewed (0)
Back to top