- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 1,180 for chan2 (0.07 sec)
-
src/internal/types/testdata/examples/functions.go
// Thus even if a type can be inferred successfully, the function // call may not be valid. func fboth[T any](chan T) {} func frecv[T any](<-chan T) {} func fsend[T any](chan<- T) {} func _() { var both chan int var recv <-chan int var send chan<-int fboth(both) fboth(recv /* ERROR "cannot use" */ ) fboth(send /* ERROR "cannot use" */ ) frecv(both) frecv(recv)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 30 20:19:38 UTC 2023 - 5.5K bytes - Viewed (0) -
test/stress/runstress.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:21:35 UTC 2024 - 3.6K bytes - Viewed (0) -
internal/grid/muxserver.go
if debugPrint { fmt.Println("connected stream mux:", ack.MuxID) } }() // Data inbound to the handler var handlerIn chan []byte if inboundCap > 0 { m.inbound = make(chan []byte, inboundCap) handlerIn = make(chan []byte, 1) go func(inbound chan []byte) { wg.Wait() defer xioutil.SafeClose(handlerIn) m.handleInbound(c, inbound, handlerIn) }(m.inbound) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 9.7K bytes - Viewed (0) -
src/go/types/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) -
src/internal/trace/testdata/testprog/stacks.go
go func() { // func1 select {} }() go func() { // func2 var c chan int c <- 0 }() go func() { // func3 var c chan int <-c }() done1 := make(chan bool) go func() { // func4 <-done1 }() done2 := make(chan bool) go func() { // func5 done2 <- true }() c1 := make(chan int) c2 := make(chan int) go func() { // func6 select { case <-c1: case <-c2: }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.4K bytes - Viewed (0) -
src/runtime/race/output_test.go
{"midstack_inlining_traceback", "run", "linux", "atexit_sleep_ms=0", ` package main var x int var c chan int func main() { c = make(chan int) go f() x = 1 <-c } func f() { g(c) } func g(c chan int) { h(c) } func h(c chan int) { c <- x } `, []string{`================== WARNING: DATA RACE Read at 0x[0-9,a-f]+ by goroutine [0-9]:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 25 20:44:25 UTC 2023 - 9.3K 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/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) -
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)