Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 947 for cancel0 (0.5 sec)

  1. src/context/context_test.go

    	defer cancel3()
    	checkNoGoroutine()
    
    	_, cancel3b := WithCancel(&myDoneCtx{ctx2})
    	defer cancel3b()
    	checkCreatedGoroutine() // ctx1 is not providing Done, must not be used
    
    	ctx4, cancel4 := WithTimeout(ctx3, veryLongDuration)
    	defer cancel4()
    	checkNoGoroutine()
    
    	ctx5, cancel5 := WithCancel(ctx4)
    	defer cancel5()
    	checkNoGoroutine()
    
    	cancel5()
    	checkNoGoroutine()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 19 19:13:01 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  2. tensorflow/cc/training/queue_runner_test.cc

    using ops::QueueDequeue;
    using ops::QueueEnqueue;
    using ops::RandomNormal;
    using ops::Square;
    using ops::Variable;
    
    constexpr char kAssignOpName[] = "assign";
    constexpr char kCancelOp0[] = "cancel0";
    constexpr char kCancelOp1[] = "cancel1";
    constexpr char kCloseOp0[] = "close0";
    constexpr char kCloseOp1[] = "close1";
    constexpr char kCountUpToOpName[] = "count";
    constexpr char kDequeueOp0[] = "dequeue0";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Sep 21 06:27:51 UTC 2019
    - 14.7K bytes
    - Viewed (0)
  3. security/pkg/pki/ca/ca_test.go

    	const rootCertFile = ""
    	rootCertCheckInverval := time.Hour
    	rsaKeySize := 2048
    
    	client := fake.NewSimpleClientset()
    
    	// succeed creating a self-signed cert
    	ctx0, cancel0 := context.WithTimeout(context.Background(), time.Millisecond*50)
    	defer cancel0()
    	_, err := NewSelfSignedIstioCAOptions(ctx0, 0,
    		caCertTTL, defaultCertTTL, rootCertCheckInverval, maxCertTTL, org, false, false,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 08:51:27 UTC 2023
    - 29.1K bytes
    - Viewed (0)
  4. 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)
  5. src/context/afterfunc_test.go

    	ctx0 := &afterFuncContext{}
    	ctx1, cancel := context.WithTimeout(ctx0, veryLongDuration)
    	defer cancel()
    	ctx0.cancel(context.Canceled)
    	<-ctx1.Done()
    }
    
    func TestCustomContextAfterFuncAfterFunc(t *testing.T) {
    	ctx0 := &afterFuncContext{}
    	donec := make(chan struct{})
    	stop := context.AfterFunc(ctx0, func() {
    		close(donec)
    	})
    	defer stop()
    	ctx0.cancel(context.Canceled)
    	<-donec
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 16:58:52 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  6. src/context/example_test.go

    	defer cancel1(errors.New("ctx1 canceled"))
    
    	ctx2, cancel2 := context.WithCancelCause(context.Background())
    
    	mergedCtx, mergedCancel := mergeCancel(ctx1, ctx2)
    	defer mergedCancel()
    
    	cancel2(errors.New("ctx2 canceled"))
    	<-mergedCtx.Done()
    	fmt.Println(context.Cause(mergedCtx))
    
    	// Output:
    	// ctx2 canceled
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 20:24:28 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. internal/dsync/drwmutex_test.go

    	drwm1 := NewDRWMutex(ds, "simplelock")
    	ctx1, cancel1 := context.WithCancel(context.Background())
    	if !drwm1.GetRLock(ctx1, cancel1, id, source, Options{Timeout: time.Second}) {
    		panic("Failed to acquire read lock")
    	}
    	// fmt.Println("1st read lock acquired, waiting...")
    
    	drwm2 := NewDRWMutex(ds, "simplelock")
    	ctx2, cancel2 := context.WithCancel(context.Background())
    	if !drwm2.GetRLock(ctx2, cancel2, id, source, Options{Timeout: time.Second}) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 9.7K bytes
    - Viewed (0)
Back to top