- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 103 for recvs (0.04 sec)
-
test/ken/chan.go
go sel(ca[0], ca[1], ca[2], ca[3], nc, nc, nc, nc) } // select send to direct recv func test3(c int) { ca := mkchan(c, 4) changeNproc(4) go recv(ca[0]) go recv(ca[1]) go recv(ca[2]) go recv(ca[3]) changeNproc(1) go sel(nc, nc, nc, nc, ca[0], ca[1], ca[2], ca[3]) } // select send to select recv func test4(c int) { ca := mkchan(c, 4) changeNproc(2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 24 05:24:24 UTC 2012 - 4.7K bytes - Viewed (0) -
test/chan/select7.go
select { case c <- 1: } } func send3(recv func(<-chan int)) { c := make(chan int) go recv(c) runtime.Gosched() c2 := make(chan int) select { case c <- 1: case c2 <- 1: } } func main() { send1(recv1) send2(recv1) send3(recv1) send1(recv2) send2(recv2) send3(recv2) send1(recv3) send2(recv3) send3(recv3)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 932 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/typesinternal/recv.go
"golang.org/x/tools/internal/aliases" ) // ReceiverNamed returns the named type (if any) associated with the // type of recv, which may be of the form N or *N, or aliases thereof. // It also reports whether a Pointer was present. func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) { t := recv.Type() if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok { isPtr = true t = ptr.Elem() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 1.3K bytes - Viewed (0) -
test/typeparam/append.go
package main type Recv <-chan int type sliceOf[E any] interface { ~[]E } func _Append[S sliceOf[T], T any](s S, t ...T) S { return append(s, t...) } func main() { recv := make(Recv) a := _Append([]Recv{recv}, recv) if len(a) != 2 || a[0] != recv || a[1] != recv { panic(a) } recv2 := make(chan<- int) a2 := _Append([]chan<- int{recv2}, recv2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 597 bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/dcl.go
func NewMethodType(sig *types.Type, recv *types.Type) *types.Type { nrecvs := 0 if recv != nil { nrecvs++ } // TODO(mdempsky): Move this function to types. // TODO(mdempsky): Preserve positions, names, and package from sig+recv. params := make([]*types.Field, nrecvs+sig.NumParams()) if recv != nil { params[0] = types.NewField(base.Pos, nil, recv) } for i, param := range sig.Params() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 14 13:15:50 UTC 2023 - 3.1K bytes - Viewed (0) -
src/cmd/compile/internal/walk/select.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 01:53:41 UTC 2023 - 7.8K bytes - Viewed (0) -
src/image/geom_test.go
// point in s being in r. for _, r := range rects { for _, s := range rects { got := r.Eq(s) want := in(r, s) == nil && in(s, r) == nil if got != want { t.Errorf("Eq: r=%s, s=%s: got %t, want %t", r, s, got, want) } } } // The intersection should be the largest rectangle a such that every point // in a is both in r and in s. for _, r := range rects { for _, s := range rects {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 10 05:05:59 UTC 2017 - 3K bytes - Viewed (0) -
test/closedchan.go
if x := c.Recv(); x != 1 { println("testasync1: Recv did not get 1:", x, c.Impl()) failed = true } test1(c) } func testasync2(c Chan) { // should be able to get the last value via Recv2 if x, ok := c.Recv2(); x != 1 || !ok { println("testasync1: Recv did not get 1, true:", x, ok, c.Impl()) failed = true } test1(c) } func testasync3(c Chan) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 04:48:57 UTC 2012 - 5.8K bytes - Viewed (0) -
test/struct0.go
// Issue 2232. package main func recv(c chan interface{}) struct{} { return (<-c).(struct{}) } var m = make(map[interface{}]int) func recv1(c chan interface{}) { defer rec() m[(<-c).(struct{})] = 0 } func rec() { recover() } func main() { c := make(chan interface{}) go recv(c) c <- struct{}{} go recv1(c) c <- struct{}{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 565 bytes - Viewed (0) -
.git-blame-ignore-revs
Guillaume Nodet <******@****.***> 1669127925 +0100
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Tue Nov 22 14:38:45 UTC 2022 - 857 bytes - Viewed (0)