- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 1,571 for chan2 (0.12 sec)
-
src/runtime/race/testdata/comp_test.go
} func TestNoRaceComp(t *testing.T) { c := make(chan bool, 1) var s S go func() { s.s2.x = 1 c <- true }() s.s2.y = 2 <-c } func TestNoRaceComp2(t *testing.T) { c := make(chan bool, 1) var s S go func() { s.s1.x = 1 c <- true }() s.s1.y = 2 <-c } func TestRaceComp(t *testing.T) { c := make(chan bool, 1) var s S go func() { s.s2.y = 1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 08 04:08:51 UTC 2014 - 2.3K bytes - Viewed (0) -
test/closedchan.go
} test1(c) } func closedsync() chan int { c := make(chan int) close(c) return c } func closedasync() chan int { c := make(chan int, 2) c <- 1 close(c) return c } var mks = []func(chan int) Chan { func(c chan int) Chan { return XChan(c) }, func(c chan int) Chan { return SChan(c) }, func(c chan int) Chan { return SSChan(c) }, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 04:48:57 UTC 2012 - 5.8K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/printer_test.go
// channels dup("package p; type _ chan chan int"), dup("package p; type _ chan (<-chan int)"), dup("package p; type _ chan chan<- int"), dup("package p; type _ <-chan chan int"), dup("package p; type _ <-chan <-chan int"), dup("package p; type _ <-chan chan<- int"), dup("package p; type _ chan<- chan int"), dup("package p; type _ chan<- <-chan int"), dup("package p; type _ chan<- chan<- int"),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 31 17:08:18 UTC 2023 - 7.6K bytes - Viewed (0) -
src/go/parser/testdata/interface.go2
[10]int struct{} *int func() interface{} map[string]int chan T chan<- T <-chan T T[int] } type _ interface { int | string []byte | string [10]int | string struct{} | string *int | string func() | string interface{} | string map[string]int | string chan T | string chan<- T | string <-chan T | string T[int] | string } type _ interface { ~int | string
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 15:34:22 UTC 2021 - 1.1K bytes - Viewed (0) -
test/chan/sieve1.go
func Sieve(primes chan<- int) { ch := make(chan int) // Create a new channel. go Generate(ch) // Start Generate() as a subprocess. for { // Note that ch is different on each iteration. prime := <-ch primes <- prime ch1 := make(chan int) go Filter(ch, ch1, prime) ch = ch1 } } func main() { primes := make(chan int) go Sieve(primes)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Feb 19 06:44:02 UTC 2012 - 1.5K bytes - Viewed (0) -
src/internal/types/testdata/check/builtins1.go
clear(x /* ERROR "cannot clear x" */) } // close type C0 interface{ int } type C1 interface{ chan int } type C2 interface{ chan int | <-chan int } type C3 interface{ chan int | chan float32 } type C4 interface{ chan int | chan<- int } type C5[T any] interface{ ~chan T | chan<- T } func _[T any](ch T) { close(ch /* ERROR "cannot close non-channel" */) } func _[T C0](ch T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 18 21:16:29 UTC 2023 - 6.8K bytes - Viewed (0) -
test/chan/doubleselect.go
panic("fail") } seen[v] = true } } func main() { runtime.GOMAXPROCS(2) flag.Parse() c1 := make(chan int) c2 := make(chan int) c3 := make(chan int) c4 := make(chan int) done := make(chan bool) cmux := make(chan int) go sender(*iterations, c1, c2, c3, c4) go mux(cmux, c1, done) go mux(cmux, c2, done) go mux(cmux, c3, done) go mux(cmux, c4, done) go func() { <-done
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 24 01:34:14 UTC 2017 - 2K bytes - Viewed (0) -
test/chan/perm.go
// Test various correct and incorrect permutations of send-only, // receive-only, and bidirectional channels. // Does not compile. package main var ( cr <-chan int cs chan<- int c chan int ) func main() { cr = c // ok cs = c // ok c = cr // ERROR "illegal types|incompatible|cannot" c = cs // ERROR "illegal types|incompatible|cannot"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jul 14 23:33:46 UTC 2021 - 1.4K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection_test.go
if err != nil { t.Errorf("server: error accepting connection: %v", err) return } streamChan := make(chan httpstream.Stream) replySentChan := make(chan (<-chan struct{})) spdyConn, err := NewServerConnection(conn, func(stream httpstream.Stream, replySent <-chan struct{}) error { streamChan <- stream replySentChan <- replySent return nil }) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 01 11:58:57 UTC 2023 - 7.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/with_retry_after_test.go
return newChannel(true) }, requestURL: "/api/v1/namespaces", userAgent: "foo", handlerInvoked: 0, closeExpected: "close", retryAfterExpected: "5", statusCodeExpected: http.StatusTooManyRequests, }, { name: "retry-after enabled, request is exempt(/metrics)", shutdownDelayDurationElapsedFn: func() <-chan struct{} {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 31 14:10:46 UTC 2021 - 6.1K bytes - Viewed (0)