Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 203 for cancel (0.18 sec)

  1. 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()
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java

       * write.
       *
       * 2. visibility of the writes to an afterDone() call triggered by cancel():
       *
       * Since these fields are non-final that means that TimeoutFuture is not being 'safely published',
       * thus a motivated caller may be able to expose the reference to another thread that would then
       * call cancel() and be unable to cancel the delegate.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  3. 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()
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue May 23 17:08:31 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/ztunnelserver_test.go

    var ztunnelTestCounter atomic.Uint32
    
    func TestZtunnelSendsPodSnapshot(t *testing.T) {
    	ztunnelKeepAliveCheckInterval = time.Second / 10
    	mt := monitortest.New(t)
    	setupLogging()
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	fixture := connect(ctx)
    	ztunClient := fixture.ztunClient
    	uid := fixture.uid
    
    	m, fds := readRequest(t, ztunClient)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  5. internal/config/lambda/target/webhook.go

    	ctx, cancel := context.WithCancel(ctx)
    
    	target := &WebhookTarget{
    		id:         event.TargetID{ID: id, Name: "webhook"},
    		args:       args,
    		loggerOnce: loggerOnce,
    		transport:  transport,
    		cancel:     cancel,
    		cancelCh:   ctx.Done(),
    	}
    
    	return target, nil
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Nov 17 20:02:26 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        async.setFuture(inner);
        async.cancel(false);
        assertTrue(inner.isCancelled());
        assertFalse(inner.wasInterrupted());
        assertThrows(CancellationException.class, () -> inner.get());
      }
    
      public void testCancel_beforeSet() throws Exception {
        SettableFuture<Object> async = SettableFuture.create();
        async.cancel(true);
        assertFalse(async.set(42));
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (1)
  7. android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java

        async.setFuture(inner);
        async.cancel(false);
        assertTrue(inner.isCancelled());
        assertFalse(inner.wasInterrupted());
        assertThrows(CancellationException.class, () -> inner.get());
      }
    
      public void testCancel_beforeSet() throws Exception {
        SettableFuture<Object> async = SettableFuture.create();
        async.cancel(true);
        assertFalse(async.set(42));
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  8. cmd/etcd.go

    	timeoutCtx, cancel := context.WithTimeout(ctx, defaultContextTimeout)
    	defer cancel()
    
    	_, err := client.Delete(timeoutCtx, key)
    	etcdLogIf(ctx, err)
    	return etcdErrToErr(err, client.Endpoints())
    }
    
    func readKeyEtcd(ctx context.Context, client *etcd.Client, key string) ([]byte, error) {
    	timeoutCtx, cancel := context.WithTimeout(ctx, defaultContextTimeout)
    	defer cancel()
    	resp, err := client.Get(timeoutCtx, key)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  9. cmd/shared-lock.go

    		select {
    		case <-ctx1.Done():
    		case <-ctx2.Done():
    		// The lock acquirer decides to cancel, exit this goroutine
    		case <-ctx.Done():
    		}
    
    		cancel()
    	}()
    	return ctx, cancel
    }
    
    func (ld sharedLock) GetLock(ctx context.Context) (context.Context, context.CancelFunc) {
    	l := <-ld.lockContext
    	return mergeContext(l.Context(), ctx)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 13 09:26:38 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  10. internal/grid/stream.go

    // 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 {
    			}
    		}
    	}()
    	doneCh := s.ctx.Done()
    	for {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Feb 28 18:05:18 GMT 2024
    - 2.8K bytes
    - Viewed (0)
Back to top