Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 304 for waitc (0.18 sec)

  1. src/internal/trace/testdata/testprog/wait-on-pipe.go

    	time.Sleep(100 * time.Millisecond)
    
    	// Write to the pipe to unblock it.
    	if _, err := syscall.Write(wfd, []byte{10}); err != nil {
    		log.Fatalf("failed to write to pipe: %v", err)
    	}
    
    	// Wait for the goroutine to unblock and start running.
    	// This is helpful to catch incorrect information written
    	// down for the syscall-blocked goroutine, since it'll start
    	// executing, and that execution information will be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. pkg/kubelet/kuberuntime/kuberuntime_termination_order.go

    	// sidecar containers need to wait on main containers, so we create a channel per main container
    	// for them to wait on
    	for _, c := range pod.Spec.Containers {
    		channel := make(chan struct{})
    		to.terminated[c.Name] = channel
    		mainContainerChannels = append(mainContainerChannels, channel)
    
    		// if its not a running container, pre-close the channel so nothing waits on it
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 00:07:21 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  3. src/cmd/go/internal/lockedfile/lockedfile_test.go

    	cmd.Env = append(os.Environ(), fmt.Sprintf("%s=%s", dirVar, dir))
    
    	qDone := make(chan struct{})
    	waitQ := mustBlock(t, "Edit A and B in subprocess", func() {
    		out, err := cmd.CombinedOutput()
    		if err != nil {
    			t.Errorf("%v:\n%s", err, out)
    		}
    		close(qDone)
    	})
    
    	// Wait until process Q has either failed or locked file B.
    	// Otherwise, P.2 might not block on file B as intended.
    locked:
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/v2/kms_plugin_mock.go

    		t.Fatalf("failed to start KMS plugin: err: %v", err)
    	}
    	return result
    }
    
    // waitForBase64PluginToBeUp waits until the plugin is ready to serve requests.
    func waitForBase64PluginToBeUp(plugin *Base64Plugin) error {
    	var gRPCErr error
    	var resp *kmsapi.StatusResponse
    	pollErr := wait.PollImmediate(1*time.Second, wait.ForeverTestTimeout, func() (bool, error) {
    		resp, gRPCErr = plugin.Status(context.Background(), &kmsapi.StatusRequest{})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 21 19:25:52 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  5. src/runtime/rwmutex_test.go

    	var cunlock atomic.Bool
    	cdone := make(chan bool)
    	for i := 0; i < numReaders; i++ {
    		go parallelReader(&m, clocked, &cunlock, cdone)
    	}
    	// Wait for all parallel RLock()s to succeed.
    	for i := 0; i < numReaders; i++ {
    		<-clocked
    	}
    	cunlock.Store(true)
    	// Wait for the goroutines to finish.
    	for i := 0; i < numReaders; i++ {
    		<-cdone
    	}
    }
    
    func TestParallelRWMutexReaders(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 22:00:45 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  6. src/runtime/lock_sema.go

    	// to the caller.
    	// This reduces the nosplit footprint of notetsleep_internal.
    	gp = getg()
    
    	// Register for wakeup on n->waitm.
    	if !atomic.Casuintptr(&n.key, 0, uintptr(unsafe.Pointer(gp.m))) {
    		// Must be locked (got wakeup).
    		if n.key != locked {
    			throw("notetsleep - waitm out of sync")
    		}
    		return true
    	}
    	if ns < 0 {
    		// Queued. Sleep.
    		gp.m.blocked = true
    		if *cgo_yield == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/test/issue9400_linux.go

    	}
    
    	// Disable GC for the duration of the test.
    	// This avoids a potential GC deadlock when spinning in uninterruptible ASM below #49695.
    	defer debug.SetGCPercent(debug.SetGCPercent(-1))
    	// SetGCPercent waits until the mark phase is over, but the runtime
    	// also preempts at the start of the sweep phase, so make sure that's
    	// done too. See #49695.
    	runtime.GC()
    
    	// Temporarily rewind the stack and trigger SIGSETXID
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 18 19:55:29 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  8. src/os/exec_unix.go

    	}
    
    	// If we can block until Wait4 will succeed immediately, do so.
    	ready, err := p.blockUntilWaitable()
    	if err != nil {
    		return nil, err
    	}
    	if ready {
    		// Mark the process done now, before the call to Wait4,
    		// so that Process.pidSignal will not send a signal.
    		p.pidDeactivate(statusDone)
    		// Acquire a write lock on sigMu to wait for any
    		// active call to the signal method to complete.
    		p.sigMu.Lock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. src/context/example_test.go

    // This example uses AfterFunc to define a function which waits on a sync.Cond,
    // stopping the wait when a context is canceled.
    func ExampleAfterFunc_cond() {
    	waitOnCond := func(ctx context.Context, cond *sync.Cond, conditionMet func() bool) error {
    		stopf := context.AfterFunc(ctx, func() {
    			// We need to acquire cond.L here to be sure that the Broadcast
    			// below won't occur before the call to Wait, which would result
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 20:24:28 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

      protected CountDownLatch latch;
      protected ListenableFuture<Boolean> future;
    
      @Override
      protected void setUp() throws Exception {
    
        // Create a latch and a future that waits on the latch.
        latch = new CountDownLatch(1);
        future = createListenableFuture(Boolean.TRUE, null, latch);
      }
    
      @Override
      protected void tearDown() throws Exception {
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 18:30:30 UTC 2023
    - 6K bytes
    - Viewed (0)
Back to top