Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 2,669 for done2 (0.5 sec)

  1. src/internal/trace/testdata/testprog/stress.go

    			for i := range tmp {
    				tmp[i]++
    			}
    			_ = tmp
    			<-done
    			wg.Done()
    		}()
    	}
    
    	// Block in syscall.
    	wg.Add(1)
    	go func() {
    		var tmp [1]byte
    		rp.Read(tmp[:])
    		<-done
    		wg.Done()
    	}()
    
    	// Test timers.
    	timerDone := make(chan bool)
    	go func() {
    		time.Sleep(time.Millisecond)
    		timerDone <- true
    	}()
    	<-timerDone
    
    	// A bit of network.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. src/runtime/race/output_test.go

    package main
    import "time"
    var xptr *int
    var donechan chan bool
    func main() {
    	done := make(chan bool)
    	x := 0
    	startRacer(&x, done)
    	store(&x, 43)
    	<-done
    }
    func store(x *int, v int) {
    	*x = v
    }
    func startRacer(x *int, done chan bool) {
    	xptr = x
    	donechan = done
    	go racer()
    }
    func racer() {
    	time.Sleep(10*time.Millisecond)
    	store(xptr, 42)
    	donechan <- true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 25 20:44:25 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  3. test/fixedbugs/issue24491a.go

    			break
    		}
    	}()
    	<-done
    
    	func() {
    		s := &S{}
    		defer s.test("method call", uintptr(setup()), uintptr(setup()), uintptr(setup()), uintptr(setup()))
    	}()
    	<-done
    
    	func() {
    		s := &S{}
    		for {
    			defer s.test("defer method loop", uintptr(setup()), uintptr(setup()), uintptr(setup()), uintptr(setup()))
    			break
    		}
    	}()
    	<-done
    
    	f()
    	<-done
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 19:36:58 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/pjrt_device_context.cc

      }
    
      if (device_buffer == nullptr) {
        done(absl::InvalidArgumentError(
            "The device tensor has no associated device buffer."));
        return;
      }
    
      xla::PjRtFuture<> future = device_buffer->ToLiteral(literal.get());
      future.OnReady([literal = std::move(literal), done = std::move(done)](
                         const tensorflow::Status& status) { done(status); });
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 13 08:49:31 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  5. src/context/context_test.go

    	select {
    	case x := <-parent.Done():
    		t.Errorf("<-parent.Done() == %v want nothing (it should block)", x)
    	case x := <-cancelChild.Done():
    		t.Errorf("<-cancelChild.Done() == %v want nothing (it should block)", x)
    	case x := <-timerChild.Done():
    		t.Errorf("<-timerChild.Done() == %v want nothing (it should block)", x)
    	case x := <-valueChild.Done():
    		t.Errorf("<-valueChild.Done() == %v want nothing (it should block)", x)
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 19 19:13:01 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  6. src/cmd/trace/testdata/testprog/main.go

    	var wg2 sync.WaitGroup
    	for i := 0; i < runtime.GOMAXPROCS(0); i++ {
    		wg2.Add(1)
    		go func() {
    			defer wg2.Done()
    			cpuHog(50 * time.Millisecond)
    		}()
    	}
    	wg2.Wait()
    
    	// checkSyscalls relies on this.
    	done := make(chan error)
    	go blockingSyscall(50*time.Millisecond, done)
    	if err := <-done; err != nil {
    		log.Fatal(err)
    	}
    
    	// checkNetworkUnblock relies on this.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 17:15:58 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  7. src/internal/trace/testdata/testprog/stress-start-stop.go

    		}()
    
    		var wg sync.WaitGroup
    		done := make(chan bool)
    
    		wg.Add(1)
    		go func() {
    			<-done
    			wg.Done()
    		}()
    
    		rp, wp, err := os.Pipe()
    		if err != nil {
    			log.Fatalf("failed to create pipe: %v", err)
    			return
    		}
    		defer func() {
    			rp.Close()
    			wp.Close()
    		}()
    		wg.Add(1)
    		go func() {
    			var tmp [1]byte
    			rp.Read(tmp[:])
    			<-done
    			wg.Done()
    		}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  8. src/sync/example_test.go

    			defer wg.Done()
    			// Fetch the URL.
    			http.Get(url)
    		}(url)
    	}
    	// Wait for all HTTP fetches to complete.
    	wg.Wait()
    }
    
    func ExampleOnce() {
    	var once sync.Once
    	onceBody := func() {
    		fmt.Println("Only once")
    	}
    	done := make(chan bool)
    	for i := 0; i < 10; i++ {
    		go func() {
    			once.Do(onceBody)
    			done <- true
    		}()
    	}
    	for i := 0; i < 10; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 17:45:47 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  9. src/runtime/race/testdata/select_test.go

    	type Task struct {
    		f    func()
    		done chan bool
    	}
    
    	queue := make(chan Task)
    	dummy := make(chan bool)
    
    	go func() {
    		for {
    			select {
    			case t := <-queue:
    				t.f()
    				t.done <- true
    			}
    		}
    	}()
    
    	doit := func(f func()) {
    		done := make(chan bool, 1)
    		select {
    		case queue <- Task{f, done}:
    		case <-dummy:
    		}
    		select {
    		case <-done:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 05:25:54 UTC 2020
    - 4.1K bytes
    - Viewed (0)
  10. pkg/registry/storage/csinode/strategy_test.go

    		},
    		Spec: storage.CSINodeSpec{
    			Drivers: []storage.CSINodeDriver{
    				{
    					Name:         "valid-driver-name",
    					NodeID:       "valid-node",
    					TopologyKeys: []string{"company.com/zone1", "company.com/zone2"},
    				},
    			},
    		},
    	}
    
    	volumeLimitsCases := []struct {
    		name     string
    		obj      *storage.CSINode
    		expected *storage.CSINode
    	}{
    		{
    			"empty allocatable",
    			emptyAllocatable,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 15 09:24:44 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top