Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 259 for recv3 (0.06 sec)

  1. test/escape_reflect.go

    	mv := reflect.ValueOf(m)
    	it.Reset(mv)
    }
    
    func recv1(ch chan string) string { // ERROR "ch does not escape"
    	v := reflect.ValueOf(ch)
    	r, _ := v.Recv()
    	return r.String()
    }
    
    func recv2(ch chan string) string { // ERROR "ch does not escape"
    	v := reflect.ValueOf(ch)
    	r, _ := v.TryRecv()
    	return r.String()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  2. test/typeparam/issue47901.go

    // license that can be found in the LICENSE file.
    
    package main
    
    type Chan[T any] chan Chan[T]
    
    func (ch Chan[T]) recv() Chan[T] {
    	return <-ch
    }
    
    func main() {
    	ch := Chan[int](make(chan Chan[int]))
    	go func() {
    		ch <- make(Chan[int])
    	}()
    	ch.recv()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 372 bytes
    - Viewed (0)
  3. src/go/types/subst.go

    		// In this case, the type of f is an interface that is itself the receiver
    		// type of all of its methods. Because we have no type name to break
    		// cycles, substituting in the recv results in an infinite loop of
    		// recv->interface->recv->interface->...
    		recv := t.recv
    
    		params := subst.tuple(t.params)
    		results := subst.tuple(t.results)
    		if params != t.params || results != t.results {
    			return &Signature{
    				rparams: t.rparams,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  4. src/go/doc/comment/testdata_test.go

    		if name == "comment" {
    			return "go/doc/comment", true
    		}
    		return DefaultLookupPackage(name)
    	}
    	p.LookupSym = func(recv, name string) (ok bool) {
    		if recv == "Parser" && name == "Parse" ||
    			recv == "" && name == "Doc" ||
    			recv == "" && name == "NoURL" {
    			return true
    		}
    		return false
    	}
    
    	stripDollars := func(b []byte) []byte {
    		// Remove trailing $ on lines.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go

    func isTimeDotFormat(f *types.Func) bool {
    	if f.Name() != "Format" || f.Pkg() == nil || f.Pkg().Path() != "time" {
    		return false
    	}
    	// Verify that the receiver is time.Time.
    	recv := f.Type().(*types.Signature).Recv()
    	return recv != nil && analysisutil.IsNamedType(recv.Type(), "time", "Time")
    }
    
    func isTimeDotParse(f *types.Func) bool {
    	return analysisutil.IsFunctionNamed(f, "time", "Parse")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/subst.go

    		// In this case, the type of f is an interface that is itself the receiver
    		// type of all of its methods. Because we have no type name to break
    		// cycles, substituting in the recv results in an infinite loop of
    		// recv->interface->recv->interface->...
    		recv := t.recv
    
    		params := subst.tuple(t.params)
    		results := subst.tuple(t.results)
    		if params != t.params || results != t.results {
    			return &Signature{
    				rparams: t.rparams,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. src/go/internal/srcimporter/srcimporter_test.go

    	for i := 0; i < iface.NumExplicitMethods(); i++ {
    		m := iface.ExplicitMethod(i)
    		recv := m.Type().(*types.Signature).Recv()
    		if recv == nil {
    			t.Errorf("%s: missing receiver type", m)
    			continue
    		}
    		if recv.Type() != named {
    			t.Errorf("%s: got recv type %s; want %s", m, recv.Type(), named)
    		}
    	}
    
    	// check embedded interfaces (they are named, too)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  8. test/chan/select5.go

    }
    `
    
    func parse(name, s string) *template.Template {
    	t, err := template.New(name).Parse(s)
    	if err != nil {
    		panic(fmt.Sprintf("%q: %s", name, err))
    	}
    	return t
    }
    
    var recv = parse("recv", `
    	{{/*  Send n, receive it one way or another into x, check that they match. */}}
    	c <- n
    	{{if .Maybe}}
    	x = <-c
    	{{else}}
    	select {
    	{{/*  Blocking or non-blocking, before the receive. */}}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 10K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/ir/tf_side_effects.h

    };
    
    struct Send : public ::mlir::SideEffects::Resource::Base<Send> {
      StringRef getName() final { return "Send"; }
    };
    
    struct Recv : public ::mlir::SideEffects::Resource::Base<Recv> {
      StringRef getName() final { return "Recv"; }
    };
    
    struct XlaHostCompute
        : public ::mlir::SideEffects::Resource::Base<XlaHostCompute> {
      StringRef getName() final { return "XlaHostCompute"; }
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 26 18:45:40 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  10. src/go/doc/reader.go

    	}
    	// function doesn't exist or has no documentation; use f
    	recv := ""
    	if f.Recv != nil {
    		var typ ast.Expr
    		// be careful in case of incorrect ASTs
    		if list := f.Recv.List; len(list) == 1 {
    			typ = list[0].Type
    		}
    		recv = recvString(typ)
    	}
    	mset[name] = &Func{
    		Doc:  f.Doc.Text(),
    		Name: name,
    		Decl: f,
    		Recv: recv,
    		Orig: recv,
    	}
    	if !preserveAST {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
Back to top