Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 237 for withCancel (4.83 sec)

  1. cmd/erasure-sets_test.go

    	}
    }
    
    // TestNewErasure - tests initialization of all input disks
    // and constructs a valid `Erasure` object
    func TestNewErasureSets(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    
    	nDisks := 16 // Maximum disks.
    	var erasureDisks []string
    	for i := 0; i < nDisks; i++ {
    		// Do not attempt to create this path, the test validates
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 12 07:21:56 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  2. pilot/pkg/xds/adstest.go

    	}).WithType(v3.SecretType)
    }
    
    func NewXdsTest(t test.Failer, conn *grpc.ClientConn, getClient func(conn *grpc.ClientConn) (DiscoveryClient, error)) *AdsTest {
    	ctx, cancel := context.WithCancel(context.Background())
    
    	cl, err := getClient(conn)
    	if err != nil {
    		t.Fatal(err)
    	}
    	resp := &AdsTest{
    		client:        cl,
    		conn:          conn,
    		context:       ctx,
    		cancelContext: cancel,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Feb 04 03:39:42 UTC 2024
    - 6K bytes
    - Viewed (0)
  3. cmd/untar.go

    		dec, err := zstd.NewReader(bf, zstd.WithDecoderMaxWindow(16<<20))
    		if err != nil {
    			return err
    		}
    		defer dec.Close()
    		r = dec
    	case formatBZ2:
    		ctx, cancel := context.WithCancel(ctx)
    		defer cancel()
    		r = pbzip2.NewReader(ctx, bf, pbzip2.DecompressionOptions(
    			pbzip2.BZConcurrency((runtime.GOMAXPROCS(0)+1)/2),
    			pbzip2.BZConcurrencyPool(bz2Limiter)))
    	case formatLZ4:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 04 12:04:40 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. src/context/example_test.go

    			for {
    				select {
    				case <-ctx.Done():
    					return // returning not to leak the goroutine
    				case dst <- n:
    					n++
    				}
    			}
    		}()
    		return dst
    	}
    
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel() // cancel when we are finished consuming integers
    
    	for n := range gen(ctx) {
    		fmt.Println(n)
    		if n == 5 {
    			break
    		}
    	}
    	// Output:
    	// 1
    	// 2
    	// 3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 20:24:28 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  5. internal/logger/target/http/http.go

    	}
    	return h.initQueueOnce.DoWithContext(ctx, h.initMemoryStore)
    }
    
    func (h *Target) initDiskStore(ctx context.Context) (err error) {
    	ctx, cancel := context.WithCancel(ctx)
    	h.storeCtxCancel = cancel
    	h.lastStarted = time.Now()
    	go h.startQueueProcessor(ctx, true)
    
    	queueStore := store.NewQueueStore[interface{}](
    		filepath.Join(h.config.QueueDir, h.Name()),
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jun 02 03:03:39 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/preemption/preemption_test.go

    			}
    			informerFactory := informers.NewSharedInformerFactory(clientsetfake.NewSimpleClientset(objs...), 0)
    			parallelism := parallelize.DefaultParallelism
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			fwk, err := tf.NewFramework(
    				ctx,
    				registeredPlugins, "",
    				frameworkruntime.WithPodNominator(internalqueue.NewPodNominator(informerFactory.Core().V1().Pods().Lister())),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  7. src/net/http/transport_dial_test.go

    // roundTrip starts a RoundTrip.
    // It returns immediately, without waiting for the RoundTrip call to complete.
    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,
    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. cmd/test-utils_test.go

    // initializes the endpoints and configures the test server.
    // The server should be started using the Start() method.
    func UnstartedTestServer(t TestErrHandler, instanceType string) TestServer {
    	ctx, cancel := context.WithCancel(context.Background())
    	// create an instance of TestServer.
    	testServer := TestServer{cancel: cancel}
    	// return FS/Erasure object layer and temp backend.
    	objLayer, disks, err := prepareTestBackend(ctx, instanceType)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 76.9K bytes
    - Viewed (0)
  9. pilot/pkg/xds/deltaadstest.go

    	})
    }
    
    func NewDeltaXdsTest(t test.Failer, conn *grpc.ClientConn,
    	getClient func(conn *grpc.ClientConn) (DeltaDiscoveryClient, error),
    ) *DeltaAdsTest {
    	ctx, cancel := context.WithCancel(context.Background())
    
    	cl, err := getClient(conn)
    	if err != nil {
    		t.Fatal(err)
    	}
    	resp := &DeltaAdsTest{
    		client:        cl,
    		conn:          conn,
    		context:       ctx,
    		cancelContext: cancel,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Feb 04 03:39:42 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/util/wait/wait.go

    // Deprecated: Will be removed in a future release in favor of
    // loopConditionUntilContext.
    func waitForWithContext(ctx context.Context, wait waitWithContextFunc, fn ConditionWithContextFunc) error {
    	waitCtx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    	c := wait(waitCtx)
    	for {
    		select {
    		case _, open := <-c:
    			ok, err := runConditionWithCrashProtectionWithContext(ctx, fn)
    			if err != nil {
    				return err
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 19:14:11 UTC 2023
    - 7.1K bytes
    - Viewed (0)
Back to top