- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,571 for chan2 (0.12 sec)
-
pkg/util/goroutinemap/goroutinemap_test.go
} } func generateCallbackFunc(done chan<- interface{}) func() error { return func() error { done <- true return nil } } func generateErrorFunc(done <-chan interface{}) func() error { return func() error { <-done return fmt.Errorf("Generic error") } } func generateWaitFunc(done <-chan interface{}) func() error { return func() error { <-done
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 11 14:09:48 UTC 2017 - 14.9K bytes - Viewed (0) -
src/runtime/proc_test.go
// iteration is 2 * (runtime overhead + chan // send/receive pair + delay + wakeDelay). This allows // the runtime overhead, including the time it takes // for the unblocked goroutine to be scheduled, to be // estimated. ping, pong := make(chan struct{}), make(chan struct{}) start := make(chan struct{}) done := make(chan struct{}) go func() { <-start
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 25.8K bytes - Viewed (0) -
src/internal/types/testdata/check/expr2.go
_ = p1 == ps1 } func channels() { // basics var c, d chan int _ = c == d _ = c != d _ = c == nil _ = c /* ERROR "< not defined" */ < d // various element types (named types) type ( C1 chan int C1r <-chan int C1s chan<- int C2 chan float32 ) var ( c1 C1 c1r C1r c1s C1s c1a chan int c2 C2 ) _ = c1 == c1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 5K bytes - Viewed (0) -
src/sync/rwmutex_test.go
func parallelReader(m *RWMutex, clocked, cunlock, cdone chan bool) { m.RLock() clocked <- true <-cunlock m.RUnlock() cdone <- true } func doTestParallelReaders(numReaders, gomaxprocs int) { runtime.GOMAXPROCS(gomaxprocs) var m RWMutex clocked := make(chan bool) cunlock := make(chan bool) cdone := make(chan bool) for i := 0; i < numReaders; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 29 17:13:13 UTC 2021 - 4.9K bytes - Viewed (0) -
test/chan/zerosize.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Feb 19 06:44:02 UTC 2012 - 349 bytes - Viewed (0) -
src/cmd/compile/internal/types2/typestring_test.go
// maps dup("map[string]int"), {"map[struct{x, y int}][]byte", "map[struct{x int; y int}][]byte"}, // channels dup("chan<- chan int"), dup("chan<- <-chan int"), dup("<-chan <-chan int"), dup("chan (<-chan int)"), dup("chan<- func()"), dup("<-chan []func() int"), } // types that depend on other type declarations (src in TestTypes) var dependentTestTypes = []testEntry{ // interfaces
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 28 17:58:07 UTC 2023 - 3.9K bytes - Viewed (0) -
test/chan/sendstmt.go
package main func main() { chanchan() sendprec() } func chanchan() { cc := make(chan chan int, 1) c := make(chan int, 1) cc <- c select { case <-cc <- 2: default: panic("nonblock") } if <-c != 2 { panic("bad receive") } } func sendprec() { c := make(chan bool, 1) c <- false || true // not a syntax error: same as c <- (false || true) if !<-c { panic("sent false")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 15 02:39:16 UTC 2017 - 672 bytes - Viewed (0) -
src/net/http/triv.go
for _, s := range os.Args { fmt.Fprint(w, s, " ") } } // a channel (just for the fun of it) type Chan chan int func ChanCreate() Chan { c := make(Chan) go func(c Chan) { for x := 0; ; x++ { c <- x } }(c) return c } func (ch Chan) ServeHTTP(w http.ResponseWriter, req *http.Request) { io.WriteString(w, fmt.Sprintf("channel send #%d\n", <-ch)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 3.2K bytes - Viewed (0) -
src/go/parser/short_test.go
`package p; import "fmt"; func f() { fmt.Println("Hello, World!") };`, `package p; func f() { if f(T{}) {} };`, `package p; func f() { _ = <-chan int(nil) };`, `package p; func f() { _ = (<-chan int)(nil) };`, `package p; func f() { _ = (<-chan <-chan int)(nil) };`, `package p; func f() { _ = <-chan <-chan <-chan <-chan <-int(nil) };`, `package p; func f(func() func() func());`, `package p; func f(...T);`, `package p; func f(float, ...int);`,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 12:56:53 UTC 2023 - 10.1K bytes - Viewed (0) -
pilot/pkg/xds/discovery_test.go
c := make(chan struct{}) go func() { wg.Wait() c <- struct{}{} }() select { case <-c: return true case <-time.After(timeout): return false } } func TestSendPushesManyPushes(t *testing.T) { stopCh := make(chan struct{}) defer close(stopCh) semaphore := make(chan struct{}, 2) queue := NewPushQueue() defer queue.ShutDown()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 30 00:26:45 UTC 2024 - 9.2K bytes - Viewed (0)